aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-01-23 20:15:59 +0000
committerBill Nottingham <notting@redhat.com>2001-01-23 20:15:59 +0000
commit3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72 (patch)
tree0f0e78f3634deed3d2c36161430ecbdbd6b53bf2 /rc.d/init.d
parenta4a25465cd2844d72bf518188b813c009450f505 (diff)
downloadinitscripts-3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72.tar
initscripts-3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72.tar.gz
initscripts-3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72.tar.bz2
initscripts-3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72.tar.xz
initscripts-3b0c07cb110c35ecb9b68ccc0fce8ed5f865cd72.zip
tag action, runcmd, etc. lines as well
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/functions20
-rwxr-xr-xrc.d/init.d/halt20
-rwxr-xr-xrc.d/init.d/netfs16
-rwxr-xr-xrc.d/init.d/network32
-rwxr-xr-xrc.d/init.d/random4
5 files changed, 46 insertions, 46 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 4638b709..d9611b5c 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -115,9 +115,9 @@ daemon() {
# And start it up.
if [ -z "$daemon_user" ]; then
- nice -n $nicelevel initlog $INITLOG_ARGS -c "$*" && success "$base startup" || failure "$base startup"
+ nice -n $nicelevel initlog $INITLOG_ARGS -c "$*" && success $"$base startup" || failure $"$base startup"
else
- nice -n $nicelevel initlog $INITLOG_ARGS -c "su $daemon_user -c \"$*\"" && success "$base startup" || failure "$base startup"
+ nice -n $nicelevel initlog $INITLOG_ARGS -c "su $daemon_user -c \"$*\"" && success $"$base startup" || failure $"$base startup"
fi
}
@@ -171,18 +171,18 @@ killproc() {
fi
checkpid $pid >/dev/null 2>&1
RC=$?
- [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
+ [ $RC -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown"
RC=$((! $RC))
# use specified level only
else
if checkpid $pid >/dev/null 2>&1; then
kill $killlevel $pid
RC=$?
- [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
+ [ $RC -eq 0 ] && success $"$base $killlevel" || failure $"$base $killlevel"
fi
fi
else
- failure "$base shutdown"
+ failure $"$base shutdown"
fi
# Remove pid file if any.
@@ -292,7 +292,7 @@ success() {
else
# silly hack to avoid EPIPE killing rc.sysinit
trap "" SIGPIPE
- echo $"$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
trap - SIGPIPE
fi
[ "$BOOTUP" != "verbose" ] && echo_success
@@ -306,7 +306,7 @@ failure() {
initlog $INITLOG_ARGS -n $0 -s "$1" -e 2
else
trap "" SIGPIPE
- echo $"$INITLOG_ARGS -n $0 -s \"$1\" -e 2" >&21
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 2" >&21
trap - SIGPIPE
fi
[ "$BOOTUP" != "verbose" ] && echo_failure
@@ -320,7 +320,7 @@ passed() {
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
else
trap "" SIGPIPE
- echo $"$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
trap - SIGPIPE
fi
[ "$BOOTUP" != "verbose" ] && echo_passed
@@ -330,9 +330,9 @@ passed() {
# Run some action. Log its output.
action() {
STRING=$1
- echo -n $"$STRING "
+ echo -n "$STRING "
shift
- initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"
+ initlog $INITLOG_ARGS -c "$*" && action $"$STRING" || action $"$STRING"
rc=$?
echo
return $rc
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index c0671ef9..f54d69d1 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -43,9 +43,9 @@ esac
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
-runcmd "Sending all processes the TERM signal..." /sbin/killall5 -15
+action $"Sending all processes the TERM signal..." /sbin/killall5 -15
sleep 5
-runcmd "Sending all processes the KILL signal..." /sbin/killall5 -9
+action $"Sending all processes the KILL signal..." /sbin/killall5 -9
# Write to wtmp file before unmounting /var
halt -w
@@ -53,19 +53,19 @@ halt -w
# Save mixer settings, here for lack of a better place.
grep -q "\(sparcaudio\|sound\)" /proc/devices
if [ $? = 0 -a -x /bin/aumix-minimal ]; then
- runcmd "Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S
+ action $"Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S
fi
# Sync clock
-runcmd "Syncing hardware clock to system time" /sbin/hwclock --systohc
+action $"Syncing hardware clock to system time" /sbin/hwclock --systohc
# Turn off swap, then unmount file systems.
SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
-[ -n "$SWAPS" ] && runcmd "Turning off swap: " swapoff $SWAPS
+[ -n "$SWAPS" ] && action $"Turning off swap: " swapoff $SWAPS
-[ -x /sbin/accton ] && runcmd "Turning off accounting: " /sbin/accton
+[ -x /sbin/accton ] && action $"Turning off accounting: " /sbin/accton
-[ -x /sbin/quotaoff ] && runcmd "Turning off quotas: " /sbin/quotaoff -a
+[ -x /sbin/quotaoff ] && action $"Turning off quotas: " /sbin/quotaoff -a
# Unmount file systems, killing processes if we have to.
sig=
@@ -74,9 +74,9 @@ remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mo
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
if [ "$retry" -lt 3 ]; then
- runcmd "Unmounting file systems (retry): " umount -a -f -t noproc
+ action $"Unmounting file systems (retry): " umount -a -f -t noproc
else
- runcmd "Unmounting file systems: " umount -a -f -t noproc
+ action $"Unmounting file systems: " umount -a -f -t noproc
fi
sleep 2
remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
@@ -95,7 +95,7 @@ mount | awk '/ext2/ { print $3 }' | while read line; do
mount -n -o ro,remount $line
done
-runcmd "Unmounting proc file system: " umount /proc
+action $"Unmounting proc file system: " umount /proc
# Now halt or reboot.
echo $"$message"
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 8b51408c..1994ca17 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -35,12 +35,12 @@ case "$1" in
[ -n "$NFSFSTAB" ] &&
{
[ ! -f /var/lock/subsys/portmap ] && service portmap start
- action "Mounting NFS filesystems: " mount -a -t nfs
+ action $"Mounting NFS filesystems: " mount -a -t nfs
}
- [ -n "$SMBFSTAB" ] && action "Mounting SMB filesystems: " mount -a -t smbfs
- [ -n "$NCPFSTAB" ] && action "Mounting NCP filesystems: " mount -a -t ncpfs
+ [ -n "$SMBFSTAB" ] && action $"Mounting SMB filesystems: " mount -a -t smbfs
+ [ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs
touch /var/lock/subsys/netfs
- action "Mounting other filesystems: " mount -a -t nonfs,smbfs,ncpfs
+ action $"Mounting other filesystems: " mount -a -t nonfs,smbfs,ncpfs
;;
stop)
[ -n "$NFSMTAB" ] && {
@@ -50,9 +50,9 @@ case "$1" in
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
if [ "$retry" -lt 3 ]; then
- action "Unmounting NFS filesystems (retry): " umount -f -a -t nfs
+ action $"Unmounting NFS filesystems (retry): " umount -f -a -t nfs
else
- action "Unmounting NFS filesystems: " umount -f -a -t nfs
+ action $"Unmounting NFS filesystems: " umount -f -a -t nfs
fi
sleep 2
remaining=`awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts`
@@ -63,8 +63,8 @@ case "$1" in
sig=-9
done
}
- [ -n "$SMBMTAB" ] && action "Unmounting SMB filesystems: " umount -a -t smbfs
- [ -n "$NCPMTAB" ] && action "Unmounting NCP filesystems: " umount -a -t ncpfs
+ [ -n "$SMBMTAB" ] && action $"Unmounting SMB filesystems: " umount -a -t smbfs
+ [ -n "$NCPMTAB" ] && action $"Unmounting NCP filesystems: " umount -a -t ncpfs
rm -f /var/lock/subsys/netfs
;;
status)
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 61ad8fb9..db379c53 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -44,9 +44,9 @@ interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \
case "$1" in
start)
- action "Setting network parameters: " sysctl -p /etc/sysctl.conf
+ action $"Setting network parameters: " sysctl -p /etc/sysctl.conf
- action "Bringing up interface lo: " ./ifup ifcfg-lo
+ action $"Bringing up interface lo: " ./ifup ifcfg-lo
case "$IPX" in
yes|true)
@@ -82,7 +82,7 @@ case "$1" in
esac
}
- action "Bringing up interface $i: " ./ifup $i boot
+ action $"Bringing up interface $i: " ./ifup $i boot
fi
done
@@ -114,7 +114,7 @@ case "$1" in
for i in $interfaces ; do
if LC_ALL= LANG= ifconfig $i 2>/dev/null | grep -q " UP " >/dev/null 2>&1 ; then
- action "Shutting down interface $i: " ./ifdown $i boot
+ action $"Shutting down interface $i: " ./ifdown $i boot
fi
done
case "$IPX" in
@@ -128,12 +128,12 @@ case "$1" in
if [ -d /proc/sys/net/ipv4 ]; then
if [ -f /proc/sys/net/ipv4/ip_forward ]; then
if [ `cat /proc/sys/net/ipv4/ip_forward` != 0 ]; then
- action "Disabling IPv4 packet forwarding: " sysctl -w net.ipv4.ip_forward=0
+ action $"Disabling IPv4 packet forwarding: " sysctl -w net.ipv4.ip_forward=0
fi
fi
if [ -f /proc/sys/net/ipv4/ip_always_defrag ]; then
if [ `cat /proc/sys/net/ipv4/ip_always_defrag` != 0 ]; then
- action "Disabling IPv4 automatic defragmentation: " sysctl -w net.ipv4.ip_always_defrag=0
+ action $"Disabling IPv4 automatic defragmentation: " sysctl -w net.ipv4.ip_always_defrag=0
fi
fi
fi
@@ -164,34 +164,34 @@ case "$1" in
if [ -x /sbin/linuxconf ] ; then
eval `/sbin/linuxconf --hint netdev`
for device in $DEV_UP ; do
- action "Bringing up device %s: " $device ./ifup $device
+ action $"Bringing up device %s: " $device ./ifup $device
done
for device in $DEV_DOWN ; do
- action "Shutting down device %s: " $device ./ifdown $device
+ action $"Shutting down device %s: " $device ./ifdown $device
done
for device in $DEV_RECONF ; do
- action "Shutting down device %s: " $device ./ifdown $device
- action "Bringing up device %s: " $device ./ifup $device
+ action $"Shutting down device %s: " $device ./ifdown $device
+ action $"Bringing up device %s: " $device ./ifup $device
done
for device in $DEV_RECONF_ALIASES ; do
- action "Bringing up alias %s: " $device /etc/sysconfig/network-scripts/ifup-aliases $device
+ action $"Bringing up alias %s: " $device /etc/sysconfig/network-scripts/ifup-aliases $device
done
for device in $DEV_RECONF_ROUTES ; do
- action "Bringing up route %s: " $device /etc/sysconfig/network-scripts/ifup-routes $device
+ action $"Bringing up route %s: " $device /etc/sysconfig/network-scripts/ifup-routes $device
done
case $IPX in yes|true)
case $IPXINTERNALNET in
reconf)
- action "Deleting internal IPX network: " /sbin/ipx_internal_net del
- action "Adding internal IPX network %s %s: " $IPXINTERNALNETNUM $IPXINTERNALNODENUM /sbin/ipx_internal_net add $IPXINTERNALNETNUM \
+ action $"Deleting internal IPX network: " /sbin/ipx_internal_net del
+ action $"Adding internal IPX network %s %s: " $IPXINTERNALNETNUM $IPXINTERNALNODENUM /sbin/ipx_internal_net add $IPXINTERNALNETNUM \
$IPXINTERNALNODENUM
;;
add)
- action "Adding internal IPX network $IPXINTERNALNETNUM $IPXINTERNALNODENUM: "/sbin/ipx_internal_net add $IPXINTERNALNETNUM \
+ action $"Adding internal IPX network $IPXINTERNALNETNUM $IPXINTERNALNODENUM: "/sbin/ipx_internal_net add $IPXINTERNALNETNUM \
$IPXINTERNALNODENUM
;;
del)
- action "Deleting internal IPX network: " /sbin/ipx_internal_net del
+ action $"Deleting internal IPX network: " /sbin/ipx_internal_net del
;;
esac
;;
diff --git a/rc.d/init.d/random b/rc.d/init.d/random
index 363ffdf2..d5c6370a 100755
--- a/rc.d/init.d/random
+++ b/rc.d/init.d/random
@@ -23,7 +23,7 @@ case "$1" in
else
touch $random_seed
fi
- action "Initializing random number generator: " /bin/true
+ action $"Initializing random number generator: " /bin/true
chmod 600 $random_seed
dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
touch /var/lock/subsys/random
@@ -34,7 +34,7 @@ case "$1" in
# Save 512 bytes, which is the size of the entropy pool
touch $random_seed
chmod 600 $random_seed
- action "Saving random seed: " dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
+ action $"Saving random seed: " dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
rm -f /var/lock/subsys/random
;;