Author: glen
Date: Fri Sep  2 08:18:05 2011
New Revision: 12340

Added:
   rc-scripts/trunk/init/allowlogin.conf
   rc-scripts/trunk/init/sys-chroots.conf
Modified:
   rc-scripts/trunk/rc.d/init.d/allowlogin
   rc-scripts/trunk/rc.d/init.d/sys-chroots
Log:
add allowlogin and sys-chroots upstart parts, altho no stop for them

Added: rc-scripts/trunk/init/allowlogin.conf
==============================================================================
--- (empty file)
+++ rc-scripts/trunk/init/allowlogin.conf       Fri Sep  2 08:18:05 2011
@@ -0,0 +1,40 @@
+description    "Allow users to login"
+
+start on pld.sysinit-done
+stop on pld.shutdown-started
+
+console output
+
+pre-start script
+       [ -f /etc/sysconfig/system ] && . /etc/sysconfig/system
+
+       # exit early without loading big init.d functions
+       case "$DELAY_LOGIN" in
+               yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
+               ;;
+       *)
+               exit 1
+               ;;
+       esac
+end script
+
+script
+       # Source function library.
+       . /etc/rc.d/init.d/functions
+
+       if is_yes "$DELAY_LOGIN" && [ -f /etc/nologin.boot ]; then
+               run_cmd "Allowing users to login" rm -f /etc/nologin 
/etc/nologin.boot
+       fi
+       end script
+
+pre-stop script
+       # Source function library.
+       . /etc/rc.d/init.d/functions
+
+       # /etc/nologin when shutting down system
+       if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
+               nls "System shutdown in progress\n" > /etc/nologin
+               chmod 644 /etc/nologin
+               cp -fp /etc/nologin /etc/nologin.boot
+       fi
+end script

Added: rc-scripts/trunk/init/sys-chroots.conf
==============================================================================
--- (empty file)
+++ rc-scripts/trunk/init/sys-chroots.conf      Fri Sep  2 08:18:05 2011
@@ -0,0 +1,23 @@
+description "Starts and stops services in chroots"
+
+start on runlevel [0123456] and pld.sysinit-done
+stop on runlevel [!$RUNLEVEL]
+
+console output
+task
+
+pre-start script
+       # test that chroots are configured
+       . /etc/sysconfig/system
+       test -n "$SYSTEM_CHROOTS"
+end script
+
+script
+       export USE_UPSTART=no
+       exec /etc/rc.d/init.d/sys-chroots start
+end script
+
+pre-stop script
+       export USE_UPSTART=no
+       exec /etc/rc.d/init.d/sys-chroots stop
+end script

Modified: rc-scripts/trunk/rc.d/init.d/allowlogin
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/allowlogin     (original)
+++ rc-scripts/trunk/rc.d/init.d/allowlogin     Fri Sep  2 08:18:05 2011
@@ -24,6 +24,8 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
+upstart_controlled
+
 start() {
        if is_yes "$DELAY_LOGIN" && [ -f /etc/nologin.boot ]; then
                run_cmd "Allowing users to login" rm -f /etc/nologin 
/etc/nologin.boot

Modified: rc-scripts/trunk/rc.d/init.d/sys-chroots
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/sys-chroots    (original)
+++ rc-scripts/trunk/rc.d/init.d/sys-chroots    Fri Sep  2 08:18:05 2011
@@ -28,6 +28,8 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
+upstart_controlled
+
 start() {
        if [ "$previous" = "N" ]; then
                runlevel=5
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to