aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-08-02 09:07:44 -0400
committerDee'Kej <deekej@linuxmail.org>2017-08-03 13:47:59 +0200
commitbf00a00483cfa675ea665d6a0dd40d5629bc928a (patch)
tree8feb8c2af7f83edc6ee94e83d7a78432ef27dbc9 /rc.d/init.d/functions
parenta019e06a883665ebab24539247ce63bf558fe699 (diff)
downloadinitscripts-bf00a00483cfa675ea665d6a0dd40d5629bc928a.tar
initscripts-bf00a00483cfa675ea665d6a0dd40d5629bc928a.tar.gz
initscripts-bf00a00483cfa675ea665d6a0dd40d5629bc928a.tar.bz2
initscripts-bf00a00483cfa675ea665d6a0dd40d5629bc928a.tar.xz
initscripts-bf00a00483cfa675ea665d6a0dd40d5629bc928a.zip
Replace /var/run with /run everywhere
https://bugzilla.redhat.com/show_bug.cgi?id=1471489
Diffstat (limited to 'rc.d/init.d/functions')
-rw-r--r--rc.d/init.d/functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 0f627f15..3acd1707 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -176,12 +176,12 @@ __kill_pids_term_kill() {
}
# __proc_pids {program} [pidfile]
-# Set $pid to pids from /var/run* for {program}. $pid should be declared
+# Set $pid to pids from /run* for {program}. $pid should be declared
# local in the caller.
# Returns LSB exit code for the 'status' action.
__pids_var_run() {
local base=${1##*/}
- local pid_file=${2:-/var/run/$base.pid}
+ local pid_file=${2:-/run/$base.pid}
local pid_dir=$(/usr/bin/dirname $pid_file > /dev/null)
local binary=$3
@@ -209,7 +209,7 @@ __pids_var_run() {
if [ -n "$pid" ]; then
return 0
fi
- return 1 # "Program is dead and /var/run pid file exists"
+ return 1 # "Program is dead and /run pid file exists"
fi
return 3 # "Program is not running"
}
@@ -393,7 +393,7 @@ killproc() {
# Remove pid file if any.
if [ -z "$killlevel" ]; then
- rm -f "${pid_file:-/var/run/$base.pid}"
+ rm -f "${pid_file:-/run/$base.pid}"
fi
return $RC
}
@@ -428,7 +428,7 @@ pidofproc() {
fi
fail_code=3 # "Program is not running"
- # First try "/var/run/*.pid" files
+ # First try "/run/*.pid" files
__pids_var_run "$1" "$pid_file"
RC=$?
if [ -n "$pid" ]; then