Package: nfs-utils / 1:1.3.4-2.5+deb10u1

21-no-more-var-run.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Author: Steve Langasek <vorlon@debian.org>
Description: PID files should be in /run, not /var/run
 Now that the /run transition is a stable release behind us, we should always
 use /run, not /var/run, for PID files.  This improves our out-of-the-box
 compatibility with /var being on a separate filesystem (possibly even an
 NFS mount itself).
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1157171

--- a/utils/statd/statd.c
+++ b/utils/statd/statd.c
@@ -159,7 +159,7 @@
 	fprintf(stderr,"      -H                   Specify a high-availability callout program.\n");
 }
 
-static const char *pidfile = "/var/run/rpc.statd.pid";
+static const char *pidfile = "/run/rpc.statd.pid";
 
 int pidfd = -1;
 static void create_pidfile(void)
--- a/utils/statd/statd.man
+++ b/utils/statd/statd.man
@@ -398,7 +398,7 @@
 .I /var/lib/nfs/state
 NSM state number for this host
 .TP 2.5i
-.I /var/run/run.statd.pid
+.I /run/run.statd.pid
 pid file
 .TP 2.5i
 .I /etc/netconfig
--- a/utils/statd/sm-notify.c
+++ b/utils/statd/sm-notify.c
@@ -871,7 +871,7 @@
 }
 
 /*
- * Record pid in /var/run/sm-notify.pid
+ * Record pid in /run/sm-notify.pid
  * This file should remain until a reboot, even if the
  * program exits.
  * If file already exists, fail.
@@ -883,7 +883,7 @@
 	int fd;
 
 	(void)snprintf(pid, sizeof(pid), "%d\n", (int)getpid());
-	fd = open("/var/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
+	fd = open("/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
 	if (fd < 0)
 		return 0;
 
--- a/utils/blkmapd/device-discovery.c
+++ b/utils/blkmapd/device-discovery.c
@@ -59,7 +59,7 @@
 #define BL_PIPE_FILE	"/var/lib/nfs/rpc_pipefs/nfs/blocklayout"
 #define NFSPIPE_DIR	"/var/lib/nfs/rpc_pipefs/nfs"
 #define RPCPIPE_DIR	"/var/lib/nfs/rpc_pipefs"
-#define PID_FILE	"/var/run/blkmapd.pid"
+#define PID_FILE	"/run/blkmapd.pid"
 
 struct bl_disk *visible_disk_list;
 int    bl_watch_fd, bl_pipe_fd, nfs_pipedir_wfd, rpc_pipedir_wfd;
--- a/systemd/nfs-blkmap.service
+++ b/systemd/nfs-blkmap.service
@@ -9,7 +9,7 @@
 
 [Service]
 Type=forking
-PIDFile=/var/run/blkmapd.pid
+PIDFile=/run/blkmapd.pid
 EnvironmentFile=-/run/sysconfig/nfs-utils
 ExecStart=/usr/sbin/blkmapd $BLKMAPDARGS