[File-rc-users] [SCM] Git repository for file-rc branch, master, updated. 2836b86b36d20466b29ebeff5d0bd02fee018505
Alexander Wirt
formorer at grml.org
Mon Mar 8 08:40:09 UTC 2010
The following commit has been merged in the master branch:
commit 3dae3a1b67eacb43ccb4e1ca6b52d4ca5ab870e2
Author: Alexander Wirt <formorer at grml.org>
Date: Mon Mar 8 09:39:33 2010 +0100
also sort after numbers in rcS
diff --git a/rcS b/rcS
index 1798e27..d74f553 100644
--- a/rcS
+++ b/rcS
@@ -102,15 +102,31 @@ do
# continue only if CMD was not started in previous runlevel
if element "$runlevel" in "$ON_LEVELS"
then
- # append CMD to the list of
- case "$CMD" in
- *.sh) CMDLIST="$CMDLIST; (set -- start; . $CMD)" ;;
- *) [ -x "$CMD" ] && CMDLIST="$CMDLIST; $CMD start" ;;
- esac
+ STARTS="$STARTS $SORT_NO:$CMD"
fi
done < $CFGFILE
+for x in 0 1 2 3 4 5 6 7 8 9
+do
+ for y in 0 1 2 3 4 5 6 7 8 9
+ do
+ for entry in $STARTS
+ do
+ SORT_NUM=${entry%%:*}
+ CMD=${entry#*:}
+ if [ $SORT_NUM -eq $x$y ]
+ then
+ # append CMD to the list of
+ case "$CMD" in
+ *.sh) CMDLIST="$CMDLIST; (set -- start; . $CMD)" ;;
+ *) [ -x "$CMD" ] && CMDLIST="$CMDLIST; $CMD start" ;;
+ esac
+ fi
+ done
+ done
+done
+
# Execute the commands collected above
(trap - INT QUIT TSTP; sh -c "$CMDLIST")
--
Git repository for file-rc
More information about the File-rc-users
mailing list