1 Author: Steve Langasek <vorlon@debian.org>
2 Description: PID files should be in /run, not /var/run
3 Now that the /run transition is a stable release behind us, we should always
4 use /run, not /var/run, for PID files. This improves our out-of-the-box
5 compatibility with /var being on a separate filesystem (possibly even an
7 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1157171
9 Index: nfs-utils/utils/statd/statd.c
10 ===================================================================
11 --- nfs-utils.orig/utils/statd/statd.c
12 +++ nfs-utils/utils/statd/statd.c
14 fprintf(stderr," -H Specify a high-availability callout program.\n");
17 -static const char *pidfile = "/var/run/rpc.statd.pid";
18 +static const char *pidfile = "/run/rpc.statd.pid";
21 static void create_pidfile(void)
22 Index: nfs-utils/utils/statd/statd.man
23 ===================================================================
24 --- nfs-utils.orig/utils/statd/statd.man
25 +++ nfs-utils/utils/statd/statd.man
28 NSM state number for this host
30 -.I /var/run/run.statd.pid
31 +.I /run/run.statd.pid
35 Index: nfs-utils/utils/statd/sm-notify.c
36 ===================================================================
37 --- nfs-utils.orig/utils/statd/sm-notify.c
38 +++ nfs-utils/utils/statd/sm-notify.c
43 - * Record pid in /var/run/sm-notify.pid
44 + * Record pid in /run/sm-notify.pid
45 * This file should remain until a reboot, even if the
47 * If file already exists, fail.
51 (void)snprintf(pid, sizeof(pid), "%d\n", (int)getpid());
52 - fd = open("/var/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
53 + fd = open("/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
57 Index: nfs-utils/utils/blkmapd/device-discovery.c
58 ===================================================================
59 --- nfs-utils.orig/utils/blkmapd/device-discovery.c
60 +++ nfs-utils/utils/blkmapd/device-discovery.c
62 #define BL_PIPE_FILE "/var/lib/nfs/rpc_pipefs/nfs/blocklayout"
63 #define NFSPIPE_DIR "/var/lib/nfs/rpc_pipefs/nfs"
64 #define RPCPIPE_DIR "/var/lib/nfs/rpc_pipefs"
65 -#define PID_FILE "/var/run/blkmapd.pid"
66 +#define PID_FILE "/run/blkmapd.pid"
68 struct bl_disk *visible_disk_list;
69 int bl_watch_fd, bl_pipe_fd, nfs_pipedir_wfd, rpc_pipedir_wfd;