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

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;
