From bf00a00483cfa675ea665d6a0dd40d5629bc928a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C3=84=C2=99drzejewski-Szmek?= Date: Wed, 2 Aug 2017 09:07:44 -0400 Subject: Replace /var/run with /run everywhere https://bugzilla.redhat.com/show_bug.cgi?id=1471489 --- rc.d/init.d/functions | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rc.d/init.d/functions') 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 -- cgit v1.2.1