Use systemd_post macro to enable services (bz 1087950)
Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
parent
cd0d5ea2a7
commit
1af376fa79
@ -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.3.0
|
Version: 1.3.0
|
||||||
Release: 1.2%{?dist}
|
Release: 1.3%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
# group all 32bit related archs
|
# group all 32bit related archs
|
||||||
@ -198,17 +198,10 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ]; then
|
%systemd_post nfs-client.target
|
||||||
/bin/systemctl enable nfs-client.target >/dev/null 2>&1 || :
|
%systemd_post nfs-config
|
||||||
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :
|
%systemd_post nfs-server
|
||||||
else
|
|
||||||
# Package upgrade
|
|
||||||
/bin/systemctl reenable nfs-client.target >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :
|
|
||||||
if /bin/systemctl --quiet is-enabled nfs-server ; then
|
|
||||||
/bin/systemctl reenable nfs-server >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
# Make sure statd used the correct uid/gid.
|
# Make sure statd used the correct uid/gid.
|
||||||
chown -R rpcuser:rpcuser /var/lib/nfs/statd
|
chown -R rpcuser:rpcuser /var/lib/nfs/statd
|
||||||
|
|
||||||
@ -226,11 +219,9 @@ if [ $1 -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart nfs-server
|
%systemd_postun_with_restart nfs-client.target
|
||||||
if [ $1 -ge 1 ]; then
|
%systemd_postun_with_restart nfs-server
|
||||||
/bin/systemctl try-restart nfs-client.target >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl try-restart nfs-server.target >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
/bin/systemctl --system daemon-reload >/dev/null 2>&1 || :
|
/bin/systemctl --system daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%triggerun -- nfs-utils < 1:1.2.4-2
|
%triggerun -- nfs-utils < 1:1.2.4-2
|
||||||
@ -239,6 +230,9 @@ if /sbin/chkconfig --level 3 nfs ; then
|
|||||||
/bin/systemctl enable nfs-server.service >/dev/null 2>&1 || :
|
/bin/systemctl enable nfs-server.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%triggerin -- nfs-utils < 1:1.3.0-0.2
|
||||||
|
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%config(noreplace) /etc/sysconfig/nfs
|
%config(noreplace) /etc/sysconfig/nfs
|
||||||
@ -285,6 +279,9 @@ fi
|
|||||||
/sbin/umount.nfs4
|
/sbin/umount.nfs4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 24 2014 Steve Dickson <steved@redhat.com> 1.3.0-1.3
|
||||||
|
- Use systemd_post macro to enable services (bz 1087950)
|
||||||
|
|
||||||
* Thu May 1 2014 Steve Dickson <steved@redhat.com> 1.3.0-1.2
|
* Thu May 1 2014 Steve Dickson <steved@redhat.com> 1.3.0-1.2
|
||||||
- mountd: fix segfault in add_name with newer gcc compilers
|
- mountd: fix segfault in add_name with newer gcc compilers
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user