From e7ca4155bbea6e89116392a5ef0e6ca396c21d9c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 13 Jan 2014 14:10:14 -0800 Subject: [PATCH] Add the actual patch to git :P --- debian/patches/21-no-more-var-run.patch | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 debian/patches/21-no-more-var-run.patch diff --git a/debian/patches/21-no-more-var-run.patch b/debian/patches/21-no-more-var-run.patch new file mode 100644 index 0000000..a957eac --- /dev/null +++ b/debian/patches/21-no-more-var-run.patch @@ -0,0 +1,69 @@ +Author: Steve Langasek +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 + +Index: nfs-utils/utils/statd/statd.c +=================================================================== +--- nfs-utils.orig/utils/statd/statd.c ++++ nfs-utils/utils/statd/statd.c +@@ -156,7 +156,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) +Index: nfs-utils/utils/statd/statd.man +=================================================================== +--- nfs-utils.orig/utils/statd/statd.man ++++ nfs-utils/utils/statd/statd.man +@@ -366,7 +366,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 +Index: nfs-utils/utils/statd/sm-notify.c +=================================================================== +--- nfs-utils.orig/utils/statd/sm-notify.c ++++ nfs-utils/utils/statd/sm-notify.c +@@ -846,7 +846,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. +@@ -858,7 +858,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; + +Index: nfs-utils/utils/blkmapd/device-discovery.c +=================================================================== +--- nfs-utils.orig/utils/blkmapd/device-discovery.c ++++ nfs-utils/utils/blkmapd/device-discovery.c +@@ -58,7 +58,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; -- 2.39.2