]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - rc.d/rc.sysinit
- removed inputrc (it must be in readline),
[projects/rc-scripts.git] / rc.d / rc.sysinit
index 9c6b93c43817983a3592a604b1674439ed088f27..d3673cefe0af862f817249433a5f41a487ce1ad0 100755 (executable)
@@ -15,23 +15,23 @@ export PATH
 
 # Read network config data.
 if [ -f /etc/sysconfig/network ]; then
-    . /etc/sysconfig/network
+       . /etc/sysconfig/network
 else
-    NETWORKING=no
-    HOSTNAME=localhost
+       NETWORKING=no
+       HOSTNAME=localhost
 fi
 
 # Read system config data.
 if [ -f /etc/sysconfig/system ]; then
-    . /etc/sysconfig/system
+       . /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
-    LOAD_SOUND=yes
+       RUN_SULOGIN_ON_ERR=yes
+       RUN_ISAPNP=yes
+       PANIC_REBOOT_TIME=0
+       DELAY_LOGIN=yes
+       CLEAN_TMP=no
+       CONSOLE_LOGLEVEL=1
+       LOAD_SOUND=yes
 fi
 
 # Set console loglevel
@@ -45,14 +45,14 @@ run_cmd "Host: ${HOSTNAME}" hostname ${HOSTNAME}
 
 # Set the NIS domain name
 if [ -n "$NISDOMAIN" ]; then
-run_cmd "NIS Domain: ${NISDOMAIN}" domainname $NISDOMAIN
+       run_cmd "NIS Domain: ${NISDOMAIN}" domainname $NISDOMAIN
 else
-    domainname ""
+       domainname ""
 fi
 
 if [ -f /fsckoptions ]; then
        fsckoptions=`cat /fsckoptions`
-    else
+else
        fsckoptions=''
 fi
 
@@ -91,25 +91,25 @@ if [ ! -f /fastboot ]; then
 fi
 
 if [ -x /sbin/quotaon ]; then
-    run_cmd "Turning on quotas on root filesystem" /sbin/quotaon /
+       run_cmd "Turning on quotas on root filesystem" /sbin/quotaon /
 fi
 
 # check for arguments 
 
 mount -t proc /proc /proc
 if grep -i nopnp /proc/cmdline >/dev/null ; then
-    PNP=
+       PNP=
 else
-    PNP=yes
+       PNP=yes
 fi
 
 # set up pnp 
 if [ -x /sbin/isapnp -a -f /etc/isapnp/isapnp.conf ]; then
-    if [ -n "$PNP" ] && [ "$RUN_ISAPNP" == "yes" ]; then
-       run_cmd "Setting up ISA PNP devices"/sbin/isapnp /etc/isapnp/isapnp.conf
-    else
-       show "Skipping ISA PNP configuration"; ok
-    fi
+       if [ -n "$PNP" ] && [ "$RUN_ISAPNP" == "yes" ]; then
+               run_cmd "Setting up ISA PNP devices"/sbin/isapnp /etc/isapnp/isapnp.conf
+       else
+               show "Skipping ISA PNP configuration"; ok
+       fi
 fi
 
 # Remount the root filesystem read-write.
@@ -122,14 +122,14 @@ fi
 
 # /etc/nologin when starting system
 if [ "$DELAY_LOGIN" == "yes" ] && [ ! -f /etc/nologin ]; then
-  show "Enabling Delay Login"; busy
-  echo > /etc/nologin
-  echo "[EN] System bootup in progress  - please wait" >> /etc/nologin
-  echo "[PL] Startowanie systemu w toku - proszê czekaæ" >> /etc/nologin
-  echo >> /etc/nologin
-  chmod 644 /etc/nologin
-  cp -fp /etc/nologin /etc/nologin.boot
-  deltext; ok
+       show "Enabling Delay Login"; busy
+       echo > /etc/nologin
+       echo "[EN] System bootup in progress  - please wait" >> /etc/nologin
+       echo "[PL] Startowanie systemu w toku - proszê czekaæ" >> /etc/nologin
+       echo >> /etc/nologin
+       chmod 644 /etc/nologin
+       cp -fp /etc/nologin /etc/nologin.boot
+       deltext; ok
 fi
 
 
@@ -141,43 +141,43 @@ mount -f /
 mount -f /proc
 
 if ! grep -i nomodules /proc/cmdline >/dev/null && [ -f /proc/ksyms ]; then
-    USEMODULES=y
+       USEMODULES=y
 else
-    USEMODULES=
+       USEMODULES=
 fi
 
 # Set up kernel version-dependent symlinks.
 rm -f /lib/modules/preferred
 if [ -n "$USEMODULES" ]; then
-    ktag="`cat /proc/version`"
-    mtag="`grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null`"
-    if [ -n "$mtag" ]; then
-       mver="`echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' -e 's,[      ].*$,,'`"
-       ln -sf /lib/modules/$mver /lib/modules/preferred
-       ln -sf /boot/System.map-$mver /boot/System.map
-       ln -sf /boot/module-info-$mver /boot/module-info
-    fi
+       ktag="`cat /proc/version`"
+       mtag="`grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null`"
+       if [ -n "$mtag" ]; then
+               mver="`echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' -e 's,[      ].*$,,'`"
+               ln -sf /lib/modules/$mver /lib/modules/preferred
+               ln -sf /boot/System.map-$mver /boot/System.map
+               ln -sf /boot/module-info-$mver /boot/module-info
+       fi
 fi
 
 if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
-    # Get ready for kerneld if module support in the kernel
-    if [ -e /lib/modules/preferred ]; then
-       run_cmd "Finding module dependencies" depmod -a preferred
-    else
-       run_cmd "Finding module dependencies" depmod -a
-    fi
+       # Get ready for kerneld if module support in the kernel
+       if [ -e /lib/modules/preferred ]; then
+               run_cmd "Finding module dependencies" depmod -a preferred
+       else
+               run_cmd "Finding module dependencies" depmod -a
+       fi
 fi
 
 # load sound modules
 if  (! grep -i nomodules /proc/cmdline >/dev/null) && [ "$LOAD_SOUND" == "yes" ]; then
-    if [ -n "$USEMODULES" ]; then
-       if grep -s "alias sound" /etc/modules.conf > /dev/null ; then
-           run_cmd "Loading sound module" modprobe sound
-           if grep -s "alias midi" /etc/conf.modules > /dev/null ; then
-               run_cmd "Loading midi module" modprobe midi
-           fi
+       if [ -n "$USEMODULES" ]; then
+               if grep -s "alias sound" /etc/modules.conf > /dev/null ; then
+                       run_cmd "Loading sound module" modprobe sound
+                       if grep -s "alias midi" /etc/conf.modules > /dev/null ; then
+                               run_cmd "Loading midi module" modprobe midi
+                       fi
+               fi
        fi
-    fi
 fi
 
 if [ -f /proc/sys/kernel/modprobe ]; then
@@ -250,12 +250,12 @@ run_cmd "Mounting local filesystems." mount -a -t nonfs,smbfs,ncpfs,proc
 
 # set the console font
 if [ -x /sbin/setsysfont ]; then
-    show "Loading default system font"; busy
-    if (/sbin/setsysfont > /dev/null 2>&1); then deltext; ok; else deltext; fail; fi
+       show "Loading default system font"; busy
+       if (/sbin/setsysfont > /dev/null 2>&1); then deltext; ok; else deltext; fail; fi
 fi
 
 if [ -x /sbin/quotaon ]; then
-    run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -a
+       run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -a
 fi
 
 # Clean out /etc & /var/{run/*,log/{b,w}tmpx}}.
@@ -265,13 +265,9 @@ rm -f /var/run/utmp
 chown root.utmpx /var/run/utmpx
 chmod 0664 /var/run/utmpx /var/log/wtmpx
 
-# Uncomment if you planing to run `utmpd'
-#:>/var/log/wtmp
-#:>/var/run/utmp
-
 # Clean /tmp
 if [ "$CLEAN_TMP" == "yes" ]; then
-rm -rf /tmp/*
+       rm -rf /tmp/*
 fi
 
 # Delete UUCP lock files.
@@ -296,36 +292,36 @@ show "Setting clock"; busy
 ARC=0
 UTC=0
 if [ -f /etc/sysconfig/clock ]; then
-    . /etc/sysconfig/clock
+       . /etc/sysconfig/clock
 
-    # convert old style clock config to new values
-    if [ "${CLOCKMODE}" = "GMT" ]; then
-           UTC=true
-    elif [ "${CLOCKMODE}" = "ARC" ]; then
+       # convert old style clock config to new values
+       if [ "${CLOCKMODE}" = "GMT" ]; then
+               UTC=true
+       elif [ "${CLOCKMODE}" = "ARC" ]; then
            ARC=true
-    fi
+       fi
 fi
 
 if [ -x /sbin/hwclock ]; then
-    CLOCKFLAGS="--hctosys"
-    CLOCK=/sbin/hwclock
+       CLOCKFLAGS="--hctosys"
+       CLOCK=/sbin/hwclock
 else
-    CLOCKFLAGS="-a"
-    CLOCK=/sbin/clock
+       CLOCKFLAGS="-a"
+       CLOCK=/sbin/clock
 fi
 
 case "$UTC" in
   yes|true)
-    CLOCKFLAGS="$CLOCKFLAGS -u";
-#    echo -n " (utc)"
-  ;;
+       CLOCKFLAGS="$CLOCKFLAGS -u";
+#      echo -n " (utc)"
+       ;;
 esac
 
 case "$ARC" in
   yes|true)
-    CLOCKFLAGS="$CLOCKFLAGS -A";
-#   echo -n " (arc)"
-  ;;
+       CLOCKFLAGS="$CLOCKFLAGS -A";
+#      echo -n " (arc)"
+       ;;
 esac
 
 #echo -n ": "
@@ -336,7 +332,10 @@ show "Date set to `date`"; ok
 # Right, now turn on swap in case we swap to files.
 show "Enabling swap space"; busy
 if [ "`LANG=C swapon -a 2>&1 | grep -v "busy"`" == "" ]; then
-deltext; ok; else deltext; fail; fi
+       deltext; ok
+else
+       deltext; fail
+fi
 
 # Initialize the serial ports.
 if [ -f /etc/rc.d/rc.serial ]; then
@@ -348,8 +347,8 @@ fi
 if [ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi | grep -q 'Type:   Sequential-Access' 2>/dev/null ; then
        if cat /proc/devices | grep -qv ' 9 st' ; then
                if [ -n "$USEMODULES" ] ; then
-                   # Try to load the module.  If it fails, ignore it...
-                   insmod -p st >/dev/null 2>&1 && modprobe st >/dev/null 2>&1
+                       # Try to load the module.  If it fails, ignore it...
+                       insmod -p st >/dev/null 2>&1 && modprobe st >/dev/null 2>&1
                fi
        fi
 fi
@@ -377,4 +376,3 @@ chmod 640 /var/log/dmesg
 
 # Feed entropy into the entropy pool
 /etc/rc.d/init.d/random start
-
This page took 0.052035 seconds and 4 git commands to generate.