SOURCES: daemontools.init - drop requirement of find(1)
glen
glen at pld-linux.org
Mon May 5 21:53:26 CEST 2008
Author: glen Date: Mon May 5 19:53:26 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- drop requirement of find(1)
---- Files affected:
SOURCES:
daemontools.init (1.19 -> 1.20)
---- Diffs:
================================================================
Index: SOURCES/daemontools.init
diff -u SOURCES/daemontools.init:1.19 SOURCES/daemontools.init:1.20
--- SOURCES/daemontools.init:1.19 Mon May 5 21:40:10 2008
+++ SOURCES/daemontools.init Mon May 5 21:53:21 2008
@@ -31,7 +31,7 @@
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/svscan ]; then
- msg_starting svscan;
+ msg_starting svscan
busy
# we can't get status report from background job
# but we can only do simple file check
@@ -40,8 +40,7 @@
RETVAL=$?
else
fail
- echo $(nls "Missing service directory")'!'
- nls "Create %s first." "$SVSCAN_DIR"
+ nls "Missing service directory. Create %s first." "$SVSCAN_DIR"
RETVAL=1
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/svscan
@@ -54,10 +53,13 @@
if [ -f /var/lock/subsys/svscan ]; then
msg_stopping svscan
killproc svscan
- svc=$(echo $SVSCAN_DIR/*)
- if [ "$svc" != "$SVSCAN_DIR/*" ]; then
- svc -d -x $SVSCAN_DIR/* \
- $(find $SVSCAN_DIR/* -maxdepth 0 -follow -perm -1000 | sed -e 's,$,/log,')
+ for s in $SVSCAN_DIR/{,*/}*/run; do
+ if [ -x "$s" ]; then
+ svc="$svc ${s%/run}"
+ fi
+ done
+ if [ "$svc" ]; then
+ svc -d -x $svc
fi
rm -f /var/run/svscan.pid /var/lock/subsys/svscan >/dev/null 2>&1
else
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/daemontools.init?r1=1.19&r2=1.20&f=u
More information about the pld-cvs-commit
mailing list