Author: glen
Date: Mon Sep 18 20:58:50 2006
New Revision: 7791

Modified:
   rc-scripts/trunk/rc.d/init.d/allowlogin
   rc-scripts/trunk/rc.d/init.d/sys-chroots
   rc-scripts/trunk/rc.d/rc
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
/etc/sysconfig/system already loaded by init.d/functions. Adjust defaults if no 
sysconfig/system is present (so the checks stay same after these changes).

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     Mon Sep 18 20:58:50 2006
@@ -9,9 +9,9 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-[ ! -f /etc/sysconfig/system ] && exit 0
-
-. /etc/sysconfig/system
+if [ ! -r /etc/sysconfig/system ]; then
+       DELAY_LOGIN=no
+fi
 
 # See how we were called.
 case "$1" in

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    Mon Sep 18 20:58:50 2006
@@ -8,9 +8,6 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-# Source system configuration.
-. /etc/sysconfig/system
-
 # Source networking configuration.
 . /etc/sysconfig/network
 
@@ -43,7 +40,6 @@
 
                        chroot $dir /bin/sh -c '
                        . /etc/rc.d/init.d/functions
-                       . /etc/sysconfig/system
                        # Clear mtab
                        :>/etc/mtab
                        [ -f /etc/cryptomtab ] && :>/etc/cryptomtab

Modified: rc-scripts/trunk/rc.d/rc
==============================================================================
--- rc-scripts/trunk/rc.d/rc    (original)
+++ rc-scripts/trunk/rc.d/rc    Mon Sep 18 20:58:50 2006
@@ -46,20 +46,6 @@
        [ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
 fi
 
-# Read system config data.
-if [ -f /etc/sysconfig/system ]; then
-       . /etc/sysconfig/system
-else
-       RUN_SULOGIN_ON_ERR=yes
-       RUN_ISAPNP=yes
-       PANIC_REBOOT_TIME=0
-       DELAY_LOGIN=yes
-       CLEAN_TMP=no
-       CONSOLE_LOGLEVEL=1
-       SET_SLINKS=yes
-       RUN_LDCONFIG=yes
-fi
-
 # Source function library.
 . /etc/rc.d/init.d/functions
 

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Mon Sep 18 20:58:50 2006
@@ -39,19 +39,7 @@
        HOSTNAME=localhost
 fi
 
-# Read system config data
-if [ -r /etc/sysconfig/system ]; then
-       . /etc/sysconfig/system
-else
-       RUN_SULOGIN_ON_ERR=yes
-       RUN_USERPNP=yes
-       RUN_KERNELPNP=yes
-       PANIC_REBOOT_TIME=0
-       DELAY_LOGIN=yes
-       CLEAN_TMP=no
-       CONSOLE_LOGLEVEL=1
-       SET_SLINKS=yes
-fi
+CONSOLE_LOGLEVEL=1
 
 # Read functions
 . /etc/rc.d/init.d/functions
@@ -324,7 +312,7 @@
 
                        PS1="$(nls '(Repair filesystem)# ')"; export PS1
                        [ "$SELINUX" = "1" ] && disable_selinux
-                       if is_yes "$RUN_SULOGIN_ON_ERR"; then
+                       if ! is_no "$RUN_SULOGIN_ON_ERR"; then
                                /sbin/sulogin
                        else
                                /bin/sh
@@ -369,10 +357,10 @@
 
        # set up pnp and kernel pnp
        if [ -n "$PNP" ]; then
-               if is_yes "$RUN_USERPNP" && [ -x /sbin/isapnp -a -f 
/etc/isapnp/isapnp.conf ]; then
+               if ! is_no "$RUN_USERPNP" && [ -x /sbin/isapnp -a -f 
/etc/isapnp/isapnp.conf ]; then
                        run_cmd "Setting up ISA PNP devices (userspace pnp)" 
/sbin/isapnp /etc/isapnp/isapnp.conf
                fi
-               if is_yes "$RUN_KERNELPNP"; then
+               if ! is_no "$RUN_KERNELPNP"; then
                        /sbin/modprobe -k isa-pnp 2> /dev/null
                        if [ -e /proc/isapnp -a -f 
/etc/isapnp/isapnp-kernel.conf ]; then
                                show "Setting up ISA PNP devices (kernelspace 
pnp)"; busy
@@ -409,7 +397,7 @@
 # Remove /etc/nologin when starting system
 [ -f /etc/nologin.boot ] && rm -f /etc/nologin /etc/nologin.boot
 
-if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
+if ! is_no "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
        show "Enabling Delay Login"; busy
        echo > /etc/nologin
        nls "System bootup in progress - please wait" >> /etc/nologin
@@ -461,7 +449,7 @@
 
        # Adjust symlinks as necessary in /boot to keep system services from
        # spewing messages about mismatched System maps and so on.
-       if is_yes "$SET_SLINKS"; then
+       if ! is_no "$SET_SLINKS"; then
                if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` ] ; 
then
                        ln -s -f System.map-`uname -r` /boot/System.map
                fi
@@ -642,7 +630,7 @@
 
                                PS1="$(nls '(RAID Repair)# ')"; export PS1
                                [ "$SELINUX" = "1" ] && disable_selinux
-                               if is_yes "$RUN_SULOGIN_ON_ERR"; then
+                               if ! is_no "$RUN_SULOGIN_ON_ERR"; then
                                        /sbin/sulogin
                                else
                                        /bin/sh
@@ -685,7 +673,7 @@
 
                        PS1="$(nls '(Repair filesystem)# ')"; export PS1
                        [ "$SELINUX" = "1" ] && disable_selinux
-                       if is_yes "$RUN_SULOGIN_ON_ERR"; then
+                       if ! is_no "$RUN_SULOGIN_ON_ERR"; then
                                /sbin/sulogin
                        else
                                /bin/sh
@@ -741,7 +729,7 @@
 
                        PS1="`nls '(Repair filesystem)# '`"; export PS1
                        [ "$SELINUX" = "1" ] && disable_selinux
-                       if is_yes "$RUN_SULOGIN_ON_ERR"; then
+                       if ! is_no "$RUN_SULOGIN_ON_ERR"; then
                                /sbin/sulogin
                        else
                                /bin/sh
@@ -800,7 +788,7 @@
                . /etc/rc.d/rc.serial
        fi
 
-       if [ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ]; then
+       if [ -f /proc/sys/kernel/panic -a -n "$PANIC_REBOOT_TIME" -a 
"$PANIC_REBOOT_TIME" -gt "0" ]; then
                show 'Setting %s seconds for kernel reboot after panic' 
"$PANIC_REBOOT_TIME"; busy
                if (sysctl -w kernel.panic=$PANIC_REBOOT_TIME >/dev/null 2>&1); 
then ok; else fail; fi
        fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to