[arch-projects] [INITSCRIPTS][PATCH 2/2] Move /var/run/daemons to /run/daemons
Sebastien Luttringer
seblu at seblu.net
Sat Apr 9 21:16:39 EDT 2011
Signed-off-by: Sebastien Luttringer <seblu at seblu.net>
---
adjtime.cron | 2 +-
functions | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/adjtime.cron b/adjtime.cron
index dac8cea..8a894f1 100755
--- a/adjtime.cron
+++ b/adjtime.cron
@@ -10,6 +10,6 @@ case $HARDWARECLOCK in
*) HWCLOCK_PARAMS="";;
esac
-if [[ $HWCLOCK_PARAMS && -f /var/run/daemons/hwclock ]]; then
+if [[ $HWCLOCK_PARAMS && -f /run/daemons/hwclock ]]; then
/sbin/hwclock $HWCLOCK_PARAMS
fi
diff --git a/functions b/functions
index e0f3bec..66b4957 100644
--- a/functions
+++ b/functions
@@ -158,16 +158,16 @@ in_array() {
# daemons:
add_daemon() {
- [[ -d /var/run/daemons ]] || /bin/mkdir -p /var/run/daemons
- > /var/run/daemons/"$1"
+ [[ -d /run/daemons ]] || /bin/mkdir -p /run/daemons
+ > /run/daemons/"$1"
}
rm_daemon() {
- /bin/rm -f /var/run/daemons/"$1"
+ /bin/rm -f /run/daemons/"$1"
}
ck_daemon() {
- [[ ! -f /var/run/daemons/$1 ]]
+ [[ ! -f /run/daemons/$1 ]]
}
# Check if $1 is a valid daemon name
@@ -226,7 +226,7 @@ kill_everything() {
# $1 = where we are being called from.
# This is used to determine which hooks to run.
# Find daemons NOT in the DAEMONS array. Shut these down first
- for daemon in /var/run/daemons/*; do
+ for daemon in /run/daemons/*; do
[[ -f $daemon ]] || continue
daemon=${daemon##*/}
in_array "$daemon" "${DAEMONS[@]}" || stop_daemon "$daemon"
--
Sebastien "Seblu" Luttringer
More information about the arch-projects
mailing list