add a mode where a newbinary restart can be used instead of
condrestart to induce a restart.
also, on upgrade, don't turn on the server RC script if it was
previously manually disabled.
Reviewed-on: http://gerrit.openafs.org/3163
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
812333c9a0d4722142d22186fe9b07b39fe6993b)
Change-Id: I54e58a5bb2ae88bfd4518c248fc9d3377c0c0981
Reviewed-on: http://gerrit.openafs.org/3235
rhstatus
;;
condrestart)
- [ -f /var/lock/subsys/openafs-server ] && restart || :
+ if [ "x$AFS_USE_BINARY_RESTART" = "xyes" ]; then
+ # this is what never shows up as
+ if [ `grep -c 'checkbintime 16 0 0 0 0' /usr/afs/local/BosConfig` = 1]; then
+ [ -f /var/lock/subsys/openafs-server ] && restart || :
+ else
+ echo $"deferring for newbinary restart"
+ fi
+ else
+ [ -f /var/lock/subsys/openafs-server ] && restart || :
+ fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
echo
%post server
-chkconfig --add openafs-server
+#on an upgrade, don't enable if we were disabled
+if [ $1 = 1 ] ; then
+ chkconfig --add openafs-server
+fi
%{initdir}/openafs-server condrestart
%if %{build_authlibs}