From 9911beee7dd91844d66ff6528c319496fc43a19b Mon Sep 17 00:00:00 2001 From: Tom "spot" Callaway Date: Sep 09 2011 15:42:39 +0000 Subject: add missing scriptlets --- diff --git a/bacula.spec b/bacula.spec index 745dc65..9c216f0 100644 --- a/bacula.spec +++ b/bacula.spec @@ -8,7 +8,7 @@ Summary: Cross platform network backup for Linux, Unix, Mac and Windows Name: bacula Version: 5.0.3 -Release: 10%{?dist} +Release: 11%{?dist} # See LICENSE for details License: GPLv2 with exceptions Group: System Environment/Daemons @@ -136,6 +136,9 @@ Requires: logwatch Requires(pre): fedora-usermgmt Requires(postun): fedora-usermgmt Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description director-common Bacula is a set of programs that allow you to manage the backup, @@ -154,6 +157,9 @@ Summary: Bacula backup client Group: System Environment/Daemons Requires: bacula-common = %{version}-%{release} Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description client Bacula is a set of programs that allow you to manage the backup, @@ -170,6 +176,9 @@ Group: System Environment/Daemons Requires: bacula-storage = %{version}-%{release} Requires: bacula-common = %{version}-%{release} Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description storage-common Bacula is a set of programs that allow you to manage the backup, @@ -742,6 +751,26 @@ if [ "$1" = 0 ]; then /usr/sbin/alternatives --remove bacula-sd /usr/sbin/bcopy.postgresql fi +%post client +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun client +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable bacula-fd.service > /dev/null 2>&1 || : + /bin/systemctl stop bacula-fd.service > /dev/null 2>&1 || : +fi + +%postun client +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || : +fi + %triggerun client -- bacula-client < 5.0.3-10 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply bacula-fd @@ -753,6 +782,26 @@ fi /bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || : +%post director-common +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun director-common +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable bacula-dir.service > /dev/null 2>&1 || : + /bin/systemctl stop bacula-dir.service > /dev/null 2>&1 || : +fi + +%postun director-common +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || : +fi + %triggerun director-common -- bacula-director-common < 5.0.3-10 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply bacula-dir @@ -764,6 +813,26 @@ fi /bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || : +%post storage-common +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun storage-common +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable bacula-sd.service > /dev/null 2>&1 || : + /bin/systemctl stop bacula-sd.service > /dev/null 2>&1 || : +fi + +%postun storage-common +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart bacula-sd.service >/dev/null 2>&1 || : +fi + %triggerun storage-common -- bacula-storage-common < 5.0.3-10 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply bacula-sd @@ -1000,6 +1069,9 @@ fi %changelog +* Fri Sep 9 2011 Tom Callaway - 5.0.3-11 +- add missing scriptlets + * Thu Sep 8 2011 Tom Callaway - 5.0.3-10 - convert to systemd