From 4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Wed, 26 Jun 2002 09:20:01 +0000 Subject: - further cleanups --- rc.d/init.d/functions | 1 + rc.d/init.d/netfs | 9 +-------- rc.d/init.d/random | 2 -- rc.d/init.d/rawdevices | 10 +++------- rc.d/init.d/single | 6 ++---- 5 files changed, 7 insertions(+), 21 deletions(-) (limited to 'rc.d/init.d') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index e3c0419e..0392f5e0 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -11,6 +11,7 @@ # # i18n originally by: Arnaldo Carvalho de Melo , # Wanderlei Antonio Cavassin + TEXTDOMAIN=initscripts TEXTDOMAINDIR=/etc/locale diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index 2f327a14..15ea6580 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -12,14 +12,8 @@ # Provides: $local_fs $remote_fs ### END INIT INFO -# Source networking configuration. -if [ ! -f /etc/sysconfig/network ]; then - exit 0 -fi - -# Source function library. +[ -f /etc/sysconfig/network ] || exit 0 . /etc/init.d/functions - . /etc/sysconfig/network # Check that networking is up. @@ -160,4 +154,3 @@ case "$1" in esac exit 0 - diff --git a/rc.d/init.d/random b/rc.d/init.d/random index 872468bb..09ddd881 100755 --- a/rc.d/init.d/random +++ b/rc.d/init.d/random @@ -8,7 +8,6 @@ # description: Saves and restores system entropy pool for higher quality \ # random number generation. -# Source function library. . /etc/init.d/functions random_seed=/var/lib/random-seed @@ -58,4 +57,3 @@ case "$1" in esac exit 0 - diff --git a/rc.d/init.d/rawdevices b/rc.d/init.d/rawdevices index 1bde3233..2d9d2cfb 100755 --- a/rc.d/init.d/rawdevices +++ b/rc.d/init.d/rawdevices @@ -10,18 +10,14 @@ # the file /etc/sysconfig/rawdevices. # config: /etc/sysconfig/rawdevices -# Source function library. -. /etc/init.d/functions - -TEXTDOMAIN=initscripts +PATH=/usr/bin:/bin:/usr/sbin:/sbin [ -f /usr/bin/raw ] || exit 0 [ -f /etc/sysconfig/rawdevices ] || exit 0 - -# If the file just has the default comments, exit. +# Exit if the file just has the default comments. grep -q -v "^#" /etc/sysconfig/rawdevices 2>/dev/null || exit 0 -PATH=/usr/bin:/bin:/usr/sbin:/sbin +. /etc/init.d/functions function assign_raw() { diff --git a/rc.d/init.d/single b/rc.d/init.d/single index c9304091..03be8134 100755 --- a/rc.d/init.d/single +++ b/rc.d/init.d/single @@ -10,9 +10,7 @@ # Modified for RHS Linux by Damien Neil # -# Set the path. PATH=/sbin:/bin:/usr/sbin:/usr/bin -TEXTDOMAIN=initscripts . /etc/rc.d/init.d/functions @@ -22,7 +20,7 @@ fi rm -f /var/lock/subsys/* -# this looks nices +# this looks nicer [ -x /usr/bin/clear ] && /usr/bin/clear # make sure modprobe is working @@ -33,7 +31,7 @@ fi # If they want to run something in single user mode, might as well run it... for i in /etc/rc1.d/S[0-9][0-9]*; do # Check if the script is there. - [ ! -f $i ] && continue + [ -f $i ] || continue # Don't run [KS]??foo.{rpmsave,rpmorig} scripts [ "${i%.rpmsave}" != "${i}" ] && continue -- cgit v1.2.1