aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorFlorian La Roche <laroche@redhat.com>2002-06-26 09:20:01 +0000
committerFlorian La Roche <laroche@redhat.com>2002-06-26 09:20:01 +0000
commit4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6 (patch)
tree0ab8b4cdcb4aef2a9f630fd645ddd31e29bb3cf9 /rc.d/init.d
parent39aa2c790f150cfc31fd59028c9cc397a7b9c8c9 (diff)
downloadinitscripts-4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6.tar
initscripts-4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6.tar.gz
initscripts-4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6.tar.bz2
initscripts-4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6.tar.xz
initscripts-4b23ce56fb9035cc129d96b1ffe85d40c53dc5f6.zip
- further cleanups
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/functions1
-rwxr-xr-xrc.d/init.d/netfs9
-rwxr-xr-xrc.d/init.d/random2
-rwxr-xr-xrc.d/init.d/rawdevices10
-rwxr-xr-xrc.d/init.d/single6
5 files changed, 7 insertions, 21 deletions
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 <acme@conectiva.com.br>,
# 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