SVN: rc-scripts/trunk/init: rc.conf rcS-sulogin.conf rcS.conf
jajcus
jajcus at pld-linux.org
Tue May 11 10:54:36 CEST 2010
Author: jajcus
Date: Tue May 11 10:54:35 2010
New Revision: 11447
Added:
rc-scripts/trunk/init/rc.conf
rc-scripts/trunk/init/rcS-sulogin.conf
rc-scripts/trunk/init/rcS.conf
Log:
- init job descriptions moved from upstart-SysVinit
Added: rc-scripts/trunk/init/rc.conf
==============================================================================
--- (empty file)
+++ rc-scripts/trunk/init/rc.conf Tue May 11 10:54:35 2010
@@ -0,0 +1,17 @@
+description "rc - System V runlevel compatibility\
+ \
+ This task runs the old sysv-rc runlevel scripts. It \
+ is usually started by the telinit compatibility wrapper."
+
+start on runlevel [0123456]
+stop on runlevel [!$RUNLEVEL]
+
+emits shutdown
+
+task
+
+export RUNLEVEL
+console output
+exec /etc/rc.d/rc $RUNLEVEL
+
+# vi: ft=upstart
Added: rc-scripts/trunk/init/rcS-sulogin.conf
==============================================================================
--- (empty file)
+++ rc-scripts/trunk/init/rcS-sulogin.conf Tue May 11 10:54:35 2010
@@ -0,0 +1,23 @@
+description "rcS-sulogin - 'single-user' runlevel compatibility \
+\
+This task runs /bin/sh during 'single-user' mode, \
+then continues to the default runlevel."
+
+start on runlevel S
+stop on runlevel [!S]
+
+emits runlevel
+
+console owner
+script
+ exec /bin/sh
+end script
+post-stop script
+ if [ "$RUNLEVEL" = "S" ]; then
+ runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
+ [ -z "$runlevel" ] && runlevel="3"
+ exec telinit $runlevel
+ fi
+end script
+
+# vi: ft=upstart
Added: rc-scripts/trunk/init/rcS.conf
==============================================================================
--- (empty file)
+++ rc-scripts/trunk/init/rcS.conf Tue May 11 10:54:35 2010
@@ -0,0 +1,32 @@
+description "rcS - runlevel compatibility \
+\
+This task runs the old sysv-rc startup scripts."
+
+start on startup
+
+stop on runlevel
+
+emits all-swaps filesystem local-filesystems root-filesystem virtual-filesystems runlevel
+
+task
+
+# Note: there can be no previous runlevel here, if we have one it's bad
+# information (we enter rc1 not rcS for maintenance). Run /etc/rc.d/rc
+# without information so that it defaults to previous=N runlevel=S.
+console output
+exec /etc/rc.d/rc.sysinit
+post-stop script
+ if [ "$UPSTART_EVENTS" = "startup" ]; then
+ runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
+ [ -z "$runlevel" ] && runlevel="3"
+ for t in $(cat /proc/cmdline); do
+ case $t in
+ -s|single|S|s) runlevel="S" ;;
+ [1-9]) runlevel="$t" ;;
+ esac
+ done
+ exec telinit $runlevel
+ fi
+end script
+
+# vi: ft=upstart
More information about the pld-cvs-commit
mailing list