|
Last change
on this file since 1100 was
1100,
checked in by jrollins, 5 years ago
|
|
cereal: device locking seems to be working now (lets hope everything
else respects the lock!). added lock checking before starting
sessions. also removed run check when stopping a session so that any
session can be stopped no matter it's state (allows for stopping
session that are stuck because of lockfiles, for instance).
|
-
Property svn:executable set to
*
|
|
File size:
827 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh -e |
|---|
| 2 | |
|---|
| 3 | # The cereal scripts were written by |
|---|
| 4 | # Jameson Rollins <jrollins@fifthhorseman.net> |
|---|
| 5 | # and |
|---|
| 6 | # Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>. |
|---|
| 7 | # |
|---|
| 8 | # They are Copyright 2007, and are all released under the GPL, version 3 |
|---|
| 9 | # or later. |
|---|
| 10 | |
|---|
| 11 | exec 2>./socket 1>&2 |
|---|
| 12 | |
|---|
| 13 | SHAREDIR="/usr/share/cereal" |
|---|
| 14 | export SHAREDIR |
|---|
| 15 | . "$SHAREDIR/common" |
|---|
| 16 | |
|---|
| 17 | # ensure that the socket is available |
|---|
| 18 | ( [ -p ./socket ] || (rm -f ./socket; mkfifo ./socket) ) || failure "can not create socket." |
|---|
| 19 | |
|---|
| 20 | # find screenrc: |
|---|
| 21 | if [ -e "./screenrc" ] ; then |
|---|
| 22 | SCREENRC="./screenrc" |
|---|
| 23 | elif [ -e "$ETC/screenrc" ] ; then |
|---|
| 24 | SCREENRC="$ETC/screenrc" |
|---|
| 25 | else |
|---|
| 26 | failure "cereal screenrc file not found." |
|---|
| 27 | fi |
|---|
| 28 | export SCREENRC |
|---|
| 29 | |
|---|
| 30 | # call the mainrun function (defined in $SHAREDIR/common) |
|---|
| 31 | # that actually runs screen |
|---|
| 32 | exec chpst -e ./env sh -c ". $SHAREDIR/common && mainrun" |
|---|
Note: See
TracBrowser
for help on using the repository browser.