Reworked how the services are restarted.
Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
parent
0082850883
commit
d7a76f3d57
@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
|
|||||||
Name: nfs-utils
|
Name: nfs-utils
|
||||||
URL: http://sourceforge.net/projects/nfs
|
URL: http://sourceforge.net/projects/nfs
|
||||||
Version: 1.2.6
|
Version: 1.2.6
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
# group all 32bit related archs
|
# group all 32bit related archs
|
||||||
@ -22,7 +22,11 @@ Source17: nfs-mountd.service
|
|||||||
Source18: nfs-idmap.service
|
Source18: nfs-idmap.service
|
||||||
Source19: nfs.target
|
Source19: nfs.target
|
||||||
%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19}
|
%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19}
|
||||||
|
#
|
||||||
|
# Services that need to be restarted.
|
||||||
|
#
|
||||||
|
%define nfs_start_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE18}
|
||||||
|
|
||||||
Source20: var-lib-nfs-rpc_pipefs.mount
|
Source20: var-lib-nfs-rpc_pipefs.mount
|
||||||
Source21: proc-fs-nfsd.mount
|
Source21: proc-fs-nfsd.mount
|
||||||
%define nfs_automounts %{SOURCE20} %{SOURCE21}
|
%define nfs_automounts %{SOURCE20} %{SOURCE21}
|
||||||
@ -213,7 +217,7 @@ chown -R rpcuser:rpcuser /var/lib/nfs/statd
|
|||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
for service in %(sed 's!\S*/!!g' <<< '%{nfs_services}') ; do
|
for service in %(sed 's!\S*/!!g' <<< '%{nfs_start_services}') ; do
|
||||||
/bin/systemctl disable $service >/dev/null 2>&1 || :
|
/bin/systemctl disable $service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl stop $service >/dev/null 2>&1 || :
|
/bin/systemctl stop $service >/dev/null 2>&1 || :
|
||||||
done
|
done
|
||||||
@ -228,7 +232,7 @@ fi
|
|||||||
%postun
|
%postun
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
for service in %(sed 's!\S*/!!g' <<< '%{nfs_services}') ; do
|
for service in %(sed 's!\S*/!!g' <<< '%{nfs_start_services}') ; do
|
||||||
/bin/systemctl try-restart $service >/dev/null 2>&1 || :
|
/bin/systemctl try-restart $service >/dev/null 2>&1 || :
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -294,6 +298,9 @@ fi
|
|||||||
%attr(4755,root,root) /sbin/umount.nfs4
|
%attr(4755,root,root) /sbin/umount.nfs4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 12 2012 Steve Dickson <steved@redhat.com> 1.2.6-5
|
||||||
|
- Reworked how the services are restarted.
|
||||||
|
|
||||||
* Tue Jun 12 2012 Steve Dickson <steved@redhat.com> 1.2.6-4
|
* Tue Jun 12 2012 Steve Dickson <steved@redhat.com> 1.2.6-4
|
||||||
- Enable legacy service names.
|
- Enable legacy service names.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user