]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
/etc/sysconfig/system already loaded by init.d/functions. Adjust defaults if no sysco...
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Sep 2006 18:58:50 +0000 (18:58 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Sep 2006 18:58:50 +0000 (18:58 +0000)
svn-id: @7791

rc.d/init.d/allowlogin
rc.d/init.d/sys-chroots
rc.d/rc
rc.d/rc.sysinit

index 26b9721632303e28d8f00d3b8a06892b5e73d1f1..df75cb9c1ae69140ec421727dbfb8bb076382323 100644 (file)
@@ -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
index 78a805d8ec8ae3d3f1659995cc0a98dde4e1e333..ddb50c4461dbae9ff6ad96d9e07834a43d74f34b 100755 (executable)
@@ -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 @@ start() {
 
                        chroot $dir /bin/sh -c '
                        . /etc/rc.d/init.d/functions
-                       . /etc/sysconfig/system
                        # Clear mtab
                        :>/etc/mtab
                        [ -f /etc/cryptomtab ] && :>/etc/cryptomtab
diff --git a/rc.d/rc b/rc.d/rc
index a0bdfaf233d7a7522a9304710588f70ed5d29c0f..d917e24f2be2ced7f51b8a0a1281f4d2869fe2bb 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -46,20 +46,6 @@ if [ -f /etc/sysconfig/i18n ]; then
        [ -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
 
index 27df1f28adbf98b9aad1c60349a2f5385af8900b..8a87b5405b2ab8e99499355ee7140be62180bbf3 100755 (executable)
@@ -39,19 +39,7 @@ else
        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 @@ if ! is_yes "$VSERVER"; then
 
                        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 @@ if ! is_yes "$VSERVER"; then
 
        # 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 @@ rm -f /etc/mtab~ /etc/mtab~~ /etc/cryptomtab~ /etc/cryptomtab~~
 # 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 @@ if ! is_yes "$VSERVER"; then
 
        # 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 @@ if ! is_yes "$VSERVER"; then
 
                                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 @@ if ! is_yes "$VSERVER"; then
 
                        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 @@ if ! is_yes "$VSERVER"; then
 
                        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 @@ if ! is_yes "$VSERVER"; then
                . /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
This page took 0.06834 seconds and 4 git commands to generate.