Accepting request 72261 from home:lnussel:branches:Base:System

- use /var/run/nfs instead of /var/lock/subsys

OBS-URL: https://build.opensuse.org/request/show/72261
OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=47
This commit is contained in:
Cristian Rodríguez 2011-06-01 16:25:59 +00:00 committed by Git OBS Bridge
parent b050b8eba0
commit a15cfb5f31
4 changed files with 32 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 31 11:43:41 UTC 2011 - lnussel@suse.de
- use /var/run/nfs instead of /var/lock/subsys
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 31 01:41:58 UTC 2011 - nfbrown@novell.com Tue May 31 01:41:58 UTC 2011 - nfbrown@novell.com

View File

@ -205,6 +205,15 @@ useradd -r -c 'NFS statd daemon' \
%post -n nfs-client %post -n nfs-client
chown statd:nogroup /var/lib/nfs chown statd:nogroup /var/lib/nfs
chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || : chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || :
### migrate from /var/lock/subsys
[ -d /var/run/nfs ] || mkdir /var/run/nfs
if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then
mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs
fi
if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then
mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs
fi
###
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_and_insserv -n nfs nfs} %{fillup_and_insserv -n nfs nfs}
# #
@ -225,6 +234,15 @@ chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || :
%stop_on_removal nfsserver %stop_on_removal nfsserver
%post -n nfs-kernel-server %post -n nfs-kernel-server
### migrate from /var/lock/subsys
[ -d /var/run/nfs ] || mkdir /var/run/nfs
if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then
mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs
fi
if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then
mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs
fi
###
%{fillup_and_insserv nfsserver} %{fillup_and_insserv nfsserver}
%postun -n nfs-kernel-server %postun -n nfs-kernel-server

View File

@ -24,12 +24,13 @@
. /etc/rc.status . /etc/rc.status
. /etc/sysconfig/nfs . /etc/sysconfig/nfs
# XXX: there should be separate init scripts for these really
IDMAPD_BIN=/usr/sbin/rpc.idmapd IDMAPD_BIN=/usr/sbin/rpc.idmapd
GSSD_BIN=/usr/sbin/rpc.gssd GSSD_BIN=/usr/sbin/rpc.gssd
STATD_BIN=/usr/sbin/rpc.statd STATD_BIN=/usr/sbin/rpc.statd
IDMAPD_CLIENT_STATE=/var/lock/subsys/nfs-rpc.idmapd IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd
IDMAPD_SERVER_STATE=/var/lock/subsys/nfsserver-rpc.idmapd IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd
NEED_IDMAPD=no NEED_IDMAPD=no
NEED_GSSD=no NEED_GSSD=no
@ -213,7 +214,8 @@ case "$1-$nfs" in
rc_status -v rc_status -v
rc_exit rc_exit
} }
echo $IDMAPD_BIN > $IDMAPD_CLIENT_STATE [ -d /var/run/nfs ] || mkdir /var/run/nfs
echo $IDMAPD_BIN > $IDMAPD_CLIENT_STATE
fi fi
rc_status -v rc_status -v

View File

@ -50,12 +50,13 @@ rc_reset
# with force-reload (in case signalling is not supported) are # with force-reload (in case signalling is not supported) are
# considered a success. # considered a success.
# XXX: there should be separate init scripts for these really
SVCGSSD_BIN=/usr/sbin/rpc.svcgssd SVCGSSD_BIN=/usr/sbin/rpc.svcgssd
IDMAPD_BIN=/usr/sbin/rpc.idmapd IDMAPD_BIN=/usr/sbin/rpc.idmapd
NFSD_BIN=/usr/sbin/rpc.nfsd NFSD_BIN=/usr/sbin/rpc.nfsd
IDMAPD_CLIENT_STATE=/var/lock/subsys/nfs-rpc.idmapd IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd
IDMAPD_SERVER_STATE=/var/lock/subsys/nfsserver-rpc.idmapd IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd
NEED_SVCGSSD=no NEED_SVCGSSD=no
NEED_IDMPAPD=no NEED_IDMPAPD=no
@ -202,6 +203,7 @@ case "$1" in
rc_status -v rc_status -v
rc_exit rc_exit
} }
[ -d /var/run/nfs ] || mkdir /var/run/nfs
echo $IDMAPD_BIN > $IDMAPD_SERVER_STATE echo $IDMAPD_BIN > $IDMAPD_SERVER_STATE
fi fi
# exportfs # exportfs