New commits:
commit afc7910dec900bedb520fb225660ab1307e12592
Author: Arwed von Merkatz <v.merkatz AT gmx.net>
Commit: Arwed von Merkatz <v.merkatz AT gmx.net>
init.d: made telinit work if a script exists in more than one runlevel
diff --git a/smgl/init.d/DETAILS b/smgl/init.d/DETAILS
index dab9e81..51e6a8b 100755
--- a/smgl/init.d/DETAILS
+++ b/smgl/init.d/DETAILS
@@ -1,5 +1,6 @@
SPELL=init.d
VERSION=2.2.2
+ PATCHLEVEL=1
LICENSE[0]=GPL
KEYWORDS="smgl"
ENTERED=20030505
diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY
index cc115d4..aaf775b 100644
--- a/smgl/init.d/HISTORY
+++ b/smgl/init.d/HISTORY
@@ -1,3 +1,8 @@
+2007-09-19 Arwed v. Merkatz <v.merkatz AT gmx.net>
+ * files/rc: fix init script execution if a script exists in more than
+ one runlevel
+ * DETAILS: PATCHLEVEL++
+
2007-08-08 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* BUILD: fix the workaround for #13363
diff --git a/smgl/init.d/files/rc b/smgl/init.d/files/rc
index b466169..8d31494 100755
--- a/smgl/init.d/files/rc
+++ b/smgl/init.d/files/rc
@@ -92,7 +92,10 @@ run_script()
local script=$1
shift 2
if [ $# -gt 0 ] ; then
- bash $RUNLEVELS_DIR/*/$script "$@"
+ # run the first matching script in case it exists in more than one
+ # runlevel
+ local scriptfile=$(builtin echo $RUNLEVELS_DIR/*/$script)
+ bash ${scriptfile%% *} "$@"
else
echo "missing script argument" > /dev/stderr && exit 1
fi
[SM-Commit] GIT changes to master grimoire by Arwed von Merkatz (afc7910dec900bedb520fb225660ab1307e12592),
Arwed von Merkatz, 09/19/2007