summaryrefslogtreecommitdiff
path: root/rc.single
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-08-26 23:26:54 +0200
committerThomas Bächler <thomas@archlinux.org>2009-08-26 23:26:54 +0200
commit58fc27aaeb6d7d67cdf93997a33e0cbe4b5d7ada (patch)
tree05e9c2df6176d3f679739b7a25d047478ee6de32 /rc.single
parentcfabb85924f35c636550609b332d088aaae9941f (diff)
Make the hook-system a bit more usable
This patch makes the hook names unique, prefixing them all with the script name (without the 'rc.') It also removes the explicit declarations of all elements of the array, bash assumes "" if they are uninitialized
Diffstat (limited to 'rc.single')
-rwxr-xr-xrc.single12
1 files changed, 6 insertions, 6 deletions
diff --git a/rc.single b/rc.single
index d72e95b..2927932 100755
--- a/rc.single
+++ b/rc.single
@@ -6,7 +6,7 @@
. /etc/rc.conf
. /etc/rc.d/functions
-run_hook start rc.single
+run_hook single_start
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
# Find daemons NOT in the DAEMONS array. Shut these down first
@@ -28,7 +28,7 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
fi
if [ "$PREVLEVEL" != "N" ]; then
- run_hook prekillall rc.single
+ run_hook single_prekillall
# Terminate all processes
stat_busy "Sending SIGTERM To Processes"
@@ -41,13 +41,13 @@ if [ "$PREVLEVEL" != "N" ]; then
/bin/sleep 1
stat_done
- run_hook postkillall rc.single
+ run_hook single_postkillall
stat_busy "Starting UDev Daemon"
/sbin/udevd --daemon
stat_done
- run_hook udevlaunched rc.single
+ run_hook single_udevlaunched
# Trigger udev uevents
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
@@ -63,7 +63,7 @@ if [ "$PREVLEVEL" != "N" ]; then
stat_done
fi
- run_hook udevsettled rc.single
+ run_hook single_udevsettled
# try syslog-NG first, then fall back to good ol' syslogd
if [ -x /etc/rc.d/syslog-ng ]; then
@@ -74,7 +74,7 @@ if [ "$PREVLEVEL" != "N" ]; then
fi
fi
-run_hook end rc.single
+run_hook single_end
if [ "$RUNLEVEL" = "1" ]; then
printsep