Fixed some bugs in the triggerun script as well in the
nfs-server scripts (bz 699040). Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
parent
eff46c41a5
commit
45233d4087
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
# Set v4 grace period if requested
|
# Set v4 grace period if requested
|
||||||
if [ -n "$NFSD_V4_GRACE" ]; then
|
if [ -n "$NFSD_V4_GRACE" ]; then
|
||||||
|
/sbin/modprobe -q nfsd
|
||||||
echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
|
echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=NFS Protocol Daemon
|
Description=NFS Server
|
||||||
After=network.target rpcbind.service
|
After=network.target rpcbind.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
EnvironmentFile=-/etc/sysconfig/nfs
|
EnvironmentFile=-/etc/sysconfig/nfs
|
||||||
EnvironmentFile=/usr/lib/nfs-utils/scripts/nfs-server.preconfig
|
ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig
|
||||||
ExecStartPre=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS
|
ExecStartPre=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS
|
||||||
ExecStartPre=/usr/sbin/exportfs -r
|
ExecStartPre=/usr/sbin/exportfs -r
|
||||||
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}
|
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}
|
||||||
|
@ -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.4
|
Version: 1.2.4
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
# group all 32bit related archs
|
# group all 32bit related archs
|
||||||
@ -182,7 +182,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
# Package install, not upgrade
|
# Package install, not upgrade
|
||||||
/bin/systemctl enable nfs-idmap.service >/dev/null 2>&1 || :
|
/bin/systemctl enable nfs-idmap.service >/dev/null 2>&1 || :
|
||||||
@ -192,8 +191,7 @@ fi
|
|||||||
chown -R rpcuser:rpcuser /var/lib/nfs/statd
|
chown -R rpcuser:rpcuser /var/lib/nfs/statd
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
if [ "$1" = "0" ]; then
|
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
for service in %{nfs_services} ; do
|
for service in %{nfs_services} ; do
|
||||||
/bin/systemctl disable $service >/dev/null 2>&1 || :
|
/bin/systemctl disable $service >/dev/null 2>&1 || :
|
||||||
@ -208,18 +206,26 @@ if [ "$1" = "0" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
if [ $1 -ge 1 ]; then
|
||||||
if [ "$1" -ge 1 ]; then
|
|
||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
for service in %{nfs_services} ; do
|
for service in %{nfs_services} ; do
|
||||||
|
echo "try-restart $service service"
|
||||||
/bin/systemctl try-restart $service >/dev/null 2>&1 || :
|
/bin/systemctl try-restart $service >/dev/null 2>&1 || :
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
/bin/systemctl --system daemon-reload >/dev/null 2>&1 || :
|
/bin/systemctl --system daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%triggerun -- nfs < 1.2.4-4
|
%triggerun -- nfs-utils < 1:1.2.4-2
|
||||||
|
/bin/systemctl enable nfs-idmap.service >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl enable nfs-lock.service >/dev/null 2>&1 || :
|
||||||
if /sbin/chkconfig --level 3 nfs ; then
|
if /sbin/chkconfig --level 3 nfs ; then
|
||||||
/bin/systemctl --no-reload enable nfsserver.service >/dev/null 2>&1 || :
|
/bin/systemctl enable nfs-server.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
if /sbin/chkconfig --level 3 rpcgssd ; then
|
||||||
|
/bin/systemctl enable nfs-secure.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
if /sbin/chkconfig --level 3 rpcsvcgssd ; then
|
||||||
|
/bin/systemctl enable nfs-secure-server.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -265,6 +271,10 @@ fi
|
|||||||
%attr(4755,root,root) /sbin/umount.nfs4
|
%attr(4755,root,root) /sbin/umount.nfs4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 10 2011 Steve Dickson <steved@redhat.com> 1.2.4-6
|
||||||
|
- Fixed some bugs in the triggerun script as well in
|
||||||
|
the nfs-server scripts (bz 699040).
|
||||||
|
|
||||||
* Wed Aug 3 2011 Steve Dickson <steved@redhat.com> 1.2.4-5
|
* Wed Aug 3 2011 Steve Dickson <steved@redhat.com> 1.2.4-5
|
||||||
- Cleaned up the .preconfig and .postconfig files per
|
- Cleaned up the .preconfig and .postconfig files per
|
||||||
code review request.
|
code review request.
|
||||||
|
Loading…
Reference in New Issue
Block a user