[Pkg-sysvinit-commits] r594 -
sysvinit/trunk/debian/sysv-rc/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Wed Jan 11 16:43:33 UTC 2006
Author: jdthood-guest
Date: 2006-01-11 16:43:33 +0000 (Wed, 11 Jan 2006)
New Revision: 594
Modified:
sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
Log:
Conditionally define startup() instead of including a condition in startup()
Modified: sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
===================================================================
--- sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2006-01-11 16:40:18 UTC (rev 593)
+++ sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2006-01-11 16:43:33 UTC (rev 594)
@@ -31,17 +31,17 @@
#
# Start script or program.
#
-startup() {
- action=$1
- shift
- scripts="$@"
- sh=sh
- # Debian Policy §9.3.1 requires .sh scripts in runlevel S to be sourced
- # However, some important packages currently contain .sh scripts
- # that do "exit" at some point, thus killing this process. Bad!
- #[ S = "$runlevel" ] && sh=.
- case "$CONCURRENCY" in
- none)
+case "$CONCURRENCY" in
+ none)
+ startup() {
+ action=$1
+ shift
+ scripts="$@"
+ sh=sh
+ # Debian Policy §9.3.1 requires .sh scripts in runlevel S to be sourced
+ # However, some important packages currently contain .sh scripts
+ # that do "exit" at some point, thus killing this process. Bad!
+ #[ S = "$runlevel" ] && sh=.
for script in $scripts ; do
case "$script" in
*.sh)
@@ -59,8 +59,18 @@
;;
esac
done
- ;;
- shell)
+ }
+ ;;
+ shell)
+ startup() {
+ action=$1
+ shift
+ scripts="$@"
+ sh=sh
+ # Debian Policy §9.3.1 requires .sh scripts in runlevel S to be sourced
+ # However, some important packages currently contain .sh scripts
+ # that do "exit" at some point, thus killing this process. Bad!
+ #[ S = "$runlevel" ] && sh=.
backgrounded=0
for script in $scripts ; do
case "$script" in
@@ -81,8 +91,18 @@
esac
done
[ 1 = "$backgrounded" ] && wait
- ;;
- startpar)
+ }
+ ;;
+ startpar)
+ startup() {
+ action=$1
+ shift
+ scripts="$@"
+ sh=sh
+ # Debian Policy §9.3.1 requires .sh scripts in runlevel S to be sourced
+ # However, some important packages currently contain .sh scripts
+ # that do "exit" at some point, thus killing this process. Bad!
+ #[ S = "$runlevel" ] && sh=.
# Make sure .sh scripts are sourced in runlevel S
if [ "." = "$sh" ] ; then
newscripts=
@@ -105,9 +125,9 @@
# startpar is not working as it should yet [pere 2005-09-10]
[ -n "$scripts" ] && $debug startpar -a $action $scripts
$debug startpar -a $action $scripts
- ;;
- esac
-}
+ }
+ ;;
+esac
on_exit() {
echo "error: '$scriptname' exited outside the expected code flow."
More information about the Pkg-sysvinit-commits
mailing list