]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/patches/21-no-more-var-run.patch
Merge branch 'sid'
[nfs-utils.git] / debian / patches / 21-no-more-var-run.patch
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
6  NFS mount itself).
7 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1157171
8
9 Index: nfs-utils/utils/statd/statd.c
10 ===================================================================
11 --- nfs-utils.orig/utils/statd/statd.c
12 +++ nfs-utils/utils/statd/statd.c
13 @@ -156,7 +156,7 @@
14         fprintf(stderr,"      -H                   Specify a high-availability callout program.\n");
15  }
16  
17 -static const char *pidfile = "/var/run/rpc.statd.pid";
18 +static const char *pidfile = "/run/rpc.statd.pid";
19  
20  int pidfd = -1;
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
26 @@ -366,7 +366,7 @@
27  .I /var/lib/nfs/state
28  NSM state number for this host
29  .TP 2.5i
30 -.I /var/run/run.statd.pid
31 +.I /run/run.statd.pid
32  pid file
33  .TP 2.5i
34  .I /etc/netconfig
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
39 @@ -846,7 +846,7 @@
40  }
41  
42  /*
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
46   * program exits.
47   * If file already exists, fail.
48 @@ -858,7 +858,7 @@
49         int fd;
50  
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);
54         if (fd < 0)
55                 return 0;
56  
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
61 @@ -58,7 +58,7 @@
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"
67  
68  struct bl_disk *visible_disk_list;
69  int    bl_watch_fd, bl_pipe_fd, nfs_pipedir_wfd, rpc_pipedir_wfd;