Requires: binutils, openafs = %{version}
%if 0%{?fedora} >= 15
Requires: systemd-units
-BuildRequires: systemd-units
Requires(post): systemd-units, systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
Group: Networking/Filesystems
%if 0%{?fedora} >= 15
Requires: systemd-units
-BuildRequires: systemd-units
Requires(post): systemd-units, systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
%if 0%{?fedora} >= 15
%postun client
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || :
-fi
%postun server
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || :
-fi
%endif
%if %{build_dkmspkg}
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
-# If the package is allowed to autostart:
-/bin/systemctl --no-reload enable openafs-client.service >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
+# Run this because the SysV package being removed won't do it
/sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
-/bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || :
%triggerun -- openafs-server < 1.6.0-1
# Save the current service runlevel info
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
-# If the package is allowed to autostart:
-/bin/systemctl --no-reload enable openafs-server.service >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
+# Run this because the SysV package being removed won't do it
/sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
-/bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || :
%endif
##############################################################################