Switch to using /run directory instead of the legacy /var/run

Closes: https://github.com/ibm-s390-tools/s390-tools/pull/53
Signed-off-by: Dan Horák <dan@danny.cz>
Acked-by: Sa Liu <saliu@de.ibm.com>
Acked-by: Harald Freudenberger <freude@linux.ibm.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Dan Horák
2019-01-31 10:42:56 +01:00
committed by Jan Höppner
parent bc053a975a
commit 847f16f632
16 changed files with 20 additions and 20 deletions

View File

@@ -110,7 +110,7 @@ The default command is --print all.
. .
.SH FILES .SH FILES
.nf .nf
/var/run/cpacfstatsd_socket /run/cpacfstatsd_socket
.fi .fi
. .
.SH RETURN VALUE .SH RETURN VALUE

View File

@@ -78,8 +78,8 @@ struct msg_answer {
#define BACKLOG 10 #define BACKLOG 10
#define SOCKET_FILE "/var/run/cpacfstatsd_socket" #define SOCKET_FILE "/run/cpacfstatsd_socket"
#define PID_FILE "/var/run/cpacfstatsd.pid" #define PID_FILE "/run/cpacfstatsd.pid"
#define CPACFSTATS_GROUP "cpacfstats" #define CPACFSTATS_GROUP "cpacfstats"

View File

@@ -47,7 +47,7 @@ restart the daemon to ensure correct summing of the per-CPU performance
counters. counters.
The starting daemon first checks for any stale pid file The starting daemon first checks for any stale pid file
/var/run/cpacfstatsd.pid. If this file exists, and the process ID in the /run/cpacfstatsd.pid. If this file exists, and the process ID in the
file belongs to an active process, an error message is printed to the file belongs to an active process, an error message is printed to the
console and the program terminates. console and the program terminates.
@@ -81,8 +81,8 @@ daemon startup and initialization failures.
.SH FILES .SH FILES
.nf .nf
/var/run/cpacfstatsd_socket /run/cpacfstatsd_socket
/var/run/cpacfstatsd.pid /run/cpacfstatsd.pid
.fi .fi
.SH RETURN VALUE .SH RETURN VALUE

View File

@@ -27,7 +27,7 @@
#define NAME "cpuplugd" #define NAME "cpuplugd"
#define MAX_HISTORY 100 #define MAX_HISTORY 100
#define PIDFILE "/var/run/cpuplugd.pid" #define PIDFILE "/run/cpuplugd.pid"
#define LOCKFILE "/var/lock/cpuplugd.lock" #define LOCKFILE "/var/lock/cpuplugd.lock"
#define PROCINFO_LINE 512 #define PROCINFO_LINE 512
#define CPUSTAT_SIZE 1024 #define CPUSTAT_SIZE 1024

View File

@@ -13,7 +13,7 @@
DAEMON=cpacfstatsd DAEMON=cpacfstatsd
DAEMON_PATH=/usr/sbin/cpacfstatsd DAEMON_PATH=/usr/sbin/cpacfstatsd
RUN_PID_FILE=/var/run/cpacfstatsd.pid RUN_PID_FILE=/run/cpacfstatsd.pid
RETVAL=0 RETVAL=0
OPTIONS="" OPTIONS=""

View File

@@ -17,7 +17,7 @@
DAEMON=cpuplugd DAEMON=cpuplugd
DAEMON_PATH=/usr/sbin/cpuplugd DAEMON_PATH=/usr/sbin/cpuplugd
CONFIG_FILE=/etc/cpuplugd.conf CONFIG_FILE=/etc/cpuplugd.conf
RUN_PID_FILE=/var/run/cpuplugd.pid RUN_PID_FILE=/run/cpuplugd.pid
RETVAL=0 RETVAL=0
OPTIONS="-c $CONFIG_FILE" OPTIONS="-c $CONFIG_FILE"

View File

@@ -22,7 +22,7 @@ DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
CMDFULL=$0 CMDFULL=$0
CMD="dumpconf" CMD="dumpconf"
LOCKFILE=/var/lock/$CMD LOCKFILE=/var/lock/$CMD
PIDFILE=/var/run/$CMD.pid PIDFILE=/run/$CMD.pid
ERRMSG="Check $DUMP_CONFIG_FILE!" ERRMSG="Check $DUMP_CONFIG_FILE!"
RETVAL=0 RETVAL=0

View File

@@ -20,8 +20,8 @@ PROCD=mon_procd
FSSTATD_PATH=/usr/sbin/$FSSTATD FSSTATD_PATH=/usr/sbin/$FSSTATD
PROCD_PATH=/usr/sbin/$PROCD PROCD_PATH=/usr/sbin/$PROCD
CONFIG_FILE=/etc/sysconfig/$DAEMON CONFIG_FILE=/etc/sysconfig/$DAEMON
FSSTATD_PID_FILE=/var/run/$FSSTATD.pid FSSTATD_PID_FILE=/run/$FSSTATD.pid
PROCD_PID_FILE=/var/run/$PROCD.pid PROCD_PID_FILE=/run/$PROCD.pid
# source function library # source function library
. /lib/lsb/init-functions . /lib/lsb/init-functions

View File

@@ -32,7 +32,7 @@ static char small_mon_record[SMALL_MON_RECORD_LEN];
static char large_mon_record[LARGE_MON_RECORD_LEN]; static char large_mon_record[LARGE_MON_RECORD_LEN];
static long sample_interval = 60; static long sample_interval = 60;
static const char *pid_file = "/var/run/mon_fsstatd.pid"; static const char *pid_file = "/run/mon_fsstatd.pid";
struct mw_name_lens { struct mw_name_lens {
__u16 mw_name_len; __u16 mw_name_len;

View File

@@ -59,7 +59,7 @@ static char buf[BUF_SIZE];
static char mon_record[MAX_REC_LEN]; static char mon_record[MAX_REC_LEN];
static long sample_interval = 60; static long sample_interval = 60;
static const char *pid_file = "/var/run/mon_procd.pid"; static const char *pid_file = "/run/mon_procd.pid";
/* /*
* Clean up when SIGTERM or SIGINT received * Clean up when SIGTERM or SIGINT received

View File

@@ -312,7 +312,7 @@ LOGFILES="\
/var/log/yum.log\ /var/log/yum.log\
/var/log/openvswitch/ovs-vswitchd.log\ /var/log/openvswitch/ovs-vswitchd.log\
/var/log/openvswitch/ovsdb-server.log\ /var/log/openvswitch/ovsdb-server.log\
/var/run/docker/libcontainerd/containerd/events.log\ /run/docker/libcontainerd/containerd/events.log\
/run/containerd/events.log\ /run/containerd/events.log\
" "

View File

@@ -15,7 +15,7 @@ ConditionVirtualization=no
[Service] [Service]
Type=forking Type=forking
ExecStart=@usrsbin_path@/cpacfstatsd ExecStart=@usrsbin_path@/cpacfstatsd
PIDFile=/var/run/cpacfstatsd.pid PIDFile=/run/cpacfstatsd.pid
KillMode=process KillMode=process
Restart=no Restart=no

View File

@@ -17,7 +17,7 @@ ExecStart=@usrsbin_path@/cpuplugd -c @sysconf_path@/cpuplugd.conf
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process
Type=forking Type=forking
PIDFile=/var/run/cpuplugd.pid PIDFile=/run/cpuplugd.pid
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@@ -34,7 +34,7 @@ ExecStart=@usrsbin_path@/mon_fsstatd -i $FSSTAT_INTERVAL
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process
Type=forking Type=forking
PIDFile=/var/run/mon_fsstatd.pid PIDFile=/run/mon_fsstatd.pid
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@@ -34,7 +34,7 @@ ExecStart=@usrsbin_path@/mon_procd -i $PROC_INTERVAL
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process
Type=forking Type=forking
PIDFile=/var/run/mon_procd.pid PIDFile=/run/mon_procd.pid
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@@ -405,7 +405,7 @@ function check_cpuplugd {
# check if cpuplugd is running # check if cpuplugd is running
# If so, the whole per-cpu mechanism of blktrace gets corrupted, which # If so, the whole per-cpu mechanism of blktrace gets corrupted, which
# results in the infamous 'bad trace magic' message # results in the infamous 'bad trace magic' message
if [ -e /var/run/cpuplugd.pid ]; then if [ -e /run/cpuplugd.pid ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
echo "$WRP_TOOLNAME: Warning: cpuplugd is running which can corrupt the traces."; echo "$WRP_TOOLNAME: Warning: cpuplugd is running which can corrupt the traces.";
echo " It is recommended to stop cpuplugd for the duration of the"; echo " It is recommended to stop cpuplugd for the duration of the";