Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
nfs-utils.23507
0018-Replace-all-var-run-with-run.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0018-Replace-all-var-run-with-run.patch of Package nfs-utils.23507
From 57f49934ac3aeab90ddbe878971bed548e6e70a4 Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.de> Date: Tue, 4 May 2021 10:49:57 +1000 Subject: [PATCH] Replace all /var/run with /run FHS 3.0 deprecated /var/run in favour of /run. FHS 3.0 was released over 5 years ago. I think it is time for nfs-utils to catch up. Note that some places, particularly systemd unit files, already use just "/run". Signed-off-by: NeilBrown <neilb@suse.de> --- support/nfs/getport.c | 2 +- tests/test-lib.sh | 2 +- utils/blkmapd/device-discovery.c | 2 +- utils/statd/sm-notify.c | 4 ++-- utils/statd/start-statd | 10 +++++----- utils/statd/statd.c | 2 +- utils/statd/statd.man | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) --- a/support/nfs/getport.c +++ b/support/nfs/getport.c @@ -903,7 +903,7 @@ int nfs_getport_ping(struct sockaddr *sa * listen on AF_LOCAL. * * If that doesn't work (for example, if portmapper is running, or rpcbind - * isn't listening on /var/run/rpcbind.sock), send a query via UDP to localhost + * isn't listening on /run/rpcbind.sock), send a query via UDP to localhost * (UDP doesn't leave a socket in TIME_WAIT, and the timeout is a relatively * short 3 seconds). */ --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -56,5 +56,5 @@ start_statd() { # shut down statd kill_statd() { - kill `cat /var/run/rpc.statd.pid` + kill `cat /run/rpc.statd.pid` } --- 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/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -883,7 +883,7 @@ find_host(uint32_t xid) } /* - * 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. @@ -895,7 +895,7 @@ static int record_pid(void) 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/statd/start-statd +++ b/utils/statd/start-statd @@ -1,18 +1,18 @@ #!/bin/sh # nfsmount calls this script when mounting a filesystem with locking # enabled, but when statd does not seem to be running (based on -# /var/run/rpc.statd.pid). +# /run/rpc.statd.pid). # It should run statd with whatever flags are apropriate for this # site. PATH="/sbin:/usr/sbin:/bin:/usr/bin" # Use flock to serialize the running of this script -exec 9> /var/run/rpc.statd.lock +exec 9> /run/rpc.statd.lock flock -e 9 -if [ -s /var/run/rpc.statd.pid ] && - [ 1`cat /var/run/rpc.statd.pid` -gt 1 ] && - kill -0 `cat /var/run/rpc.statd.pid` > /dev/null 2>&1 +if [ -s /run/rpc.statd.pid ] && + [ 1`cat /run/rpc.statd.pid` -gt 1 ] && + kill -0 `cat /run/rpc.statd.pid` > /dev/null 2>&1 then # statd already running - must have been slow to respond. exit 0 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -161,7 +161,7 @@ usage(void) 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 @@ -434,7 +434,7 @@ directory containing notify list .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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor