Description: replace /var/run with /run
Author: Marc Haber <mh+debian-packages@zugschlus.de>
Forwarded: via web form
Last-Update: 2016-08-07
--- a/45atoppm
+++ b/45atoppm
@@ -4,7 +4,7 @@
 
 LOGPATH=/var/log/atop
 BINPATH=/usr/bin
-PIDFILE=/var/run/atop.pid
+PIDFILE=/run/atop.pid
 INTERVAL=600		# interval 10 minutes
 CURDAY=`date +%Y%m%d`	# current date in same format
 
--- a/atop.daily
+++ b/atop.daily
@@ -3,7 +3,7 @@
 CURDAY=`date +%Y%m%d`
 LOGPATH=/var/log/atop
 BINPATH=/usr/bin
-PIDFILE=/var/run/atop.pid
+PIDFILE=/run/atop.pid
 INTERVAL=600				# interval 10 minutes
 
 # verify if atop still runs for daily logging
--- a/atop.init
+++ b/atop.init
@@ -20,7 +20,7 @@
 # Check existance of binaries 
 [ -f /usr/bin/atop ] || exit 0
 
-PIDFILE=/var/run/atop.pid
+PIDFILE=/run/atop.pid
 RETVAL=0
 
 # See how we were called.
@@ -35,7 +35,7 @@ case "$1" in
 		# Start atop
 		/usr/share/atop/atop.daily&
 	fi
-	touch /var/lock/subsys/atop
+	touch /run/lock/atop
 	;;
 
   stop)
@@ -61,7 +61,7 @@ case "$1" in
 
 		rm $PIDFILE
 	fi
-	rm /var/lock/subsys/atop
+	rm /run/lock/atop
 	;;
 
   status)
--- a/atopacct.init
+++ b/atopacct.init
@@ -54,11 +54,11 @@ case "$1" in
 		:
 	else
 		# Start atopacctd
-		rm -rf /var/run/pacct_shadow.d 2> /dev/null
+		rm -rf /run/pacct_shadow.d 2> /dev/null
 		/usr/sbin/atopacctd
 	fi
 
-	touch /var/lock/subsys/atopacctd
+	touch /run/lock/atopacctd
 	;;
 
   stop)
@@ -68,7 +68,7 @@ case "$1" in
 	then
 		kill $(ps -e | grep atopacctd$ | sed 's/^ *//' | cut -d' ' -f1)
 	fi
-	rm /var/lock/subsys/atopacctd
+	rm /run/lock/atopacctd
 	;;
 
   status)
--- a/atopacct.service
+++ b/atopacct.service
@@ -6,7 +6,7 @@ Before=atop.service
 
 [Service]
 Type=forking
-PIDFile=/var/run/atopacctd.pid
+PIDFile=/run/atopacctd.pid
 ExecStart=/usr/sbin/atopacctd
 
 [Install]
--- a/atopacctd.c
+++ b/atopacctd.c
@@ -24,7 +24,7 @@
 **   any more. As soon as at least one client is activated again, the
 **   atopacctd daemon start writing shadow files again.
 **
-** The directory /var/run is used as the default top-directory. An
+** The directory /run is used as the default top-directory. An
 ** alternative top-directory can be specified as command line argument
 ** (in that case, also modify /etc/atoprc to inform atop as a client).
 ** Below this top-directory the source file pacct_source is created and
--- a/atopacctd.h
+++ b/atopacctd.h
@@ -7,7 +7,7 @@
 /*
 ** name of the PID file
 */
-#define	PIDFILE		"/var/run/atopacctd.pid"
+#define	PIDFILE		"/run/atopacctd.pid"
 
 /*
 ** directory containing the source accounting file and
@@ -15,7 +15,7 @@
 ** this directory can be overruled by a command line parameter (atopacctd)
 ** or by a keyword in the /etc/atoprc file (atop)
 */
-#define	PACCTDIR	"/var/run"
+#define	PACCTDIR	"/run"
 
 /*
 ** accounting file (source file to which kernel writes records)
--- a/man/atop.1
+++ b/man/atop.1
@@ -2028,7 +2028,7 @@ View the contents of the standard logfil
 .SH FILES
 .PP
 .TP 5
-.B /var/run/pacct_shadow.d/
+.B /run/pacct_shadow.d/
 Directory containing the process accounting shadow files that are
 used by
 .I atop
@@ -2069,7 +2069,7 @@ All binary system and process level data
 in compressed format. 
 .PP
 .TP 5
-.BI /var/run/netatop.log
+.BI /run/netatop.log
 File that contains the netpertask structs containing the network
 counters of exited processes. These structs are written by the
 .I netatopd
--- a/man/atopacctd.8
+++ b/man/atopacctd.8
@@ -70,7 +70,7 @@ any more. As soon as at least one client
 daemon continues writing shadow files.
 .PP
 The directory
-.B /var/run
+.B /run
 is used as the default topdirectory.
 Below this top-directory, the source file
 .B pacct_source
@@ -121,17 +121,17 @@ daemon.
 .SH FILES
 .PP
 .TP 5
-.B /var/run/pacct_source
+.B /run/pacct_source
 Regular file to which the kernel writes the process accounting records.
 This file will be regularly truncated.
 .PP
 .TP 5
-.B /var/run/pacct_shadow.d/current
+.B /run/pacct_shadow.d/current
 Regular file containing the sequence number of the current shadow file
 and the maximum number of records per shadow file.
 .PP
 .TP 5
-.B /var/run/pacct_shadow.d/N.paf
+.B /run/pacct_shadow.d/N.paf
 Regular files containing the process accounting records that have
 been copied transparently from the source file (N represents a 10-digit
 sequence number).
--- a/man/atoprc.5
+++ b/man/atoprc.5
@@ -197,7 +197,7 @@ daemon. In this directory, the daemon cr
 .B pacct_shadow.d
 in which files will be written containing the process accounting records.
 The default topdirectory is
-.B /var/run
+.B /run
 and this option only has to be specified when the
 .B atopacctd
 daemon is started with an alternative topdirectory as command line argument.
--- a/netatopd.h
+++ b/netatopd.h
@@ -1,6 +1,6 @@
 #define SEMAKEY         1541961
 
-#define NETEXITFILE     "/var/run/netatop.log"
+#define NETEXITFILE     "/run/netatop.log"
 #define MYMAGIC         (unsigned int) 0xfeedb0b0
 
 struct naheader {
--- a/psaccs_atop
+++ b/psaccs_atop
@@ -24,7 +24,7 @@
 	            # stop atop daemon before accounting file
 	            # is rotated
 	            #
-	            PIDFILE=/var/run/atop.pid
+	            PIDFILE=/run/atop.pid
 
 	            if [ -e $PIDFILE ] && \
 	                   ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null
--- a/psaccu_atop
+++ b/psaccu_atop
@@ -10,7 +10,7 @@
 	then
 	    # if the atop daemon does not run, restart it after
 	    # accounting file is rotated
-	    PIDFILE=/var/run/atop.pid
+	    PIDFILE=/run/atop.pid
 
 	    if [ -e $PIDFILE ] && \
 			ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null
