Reworked RPM scriptlets to use systemd-rpm macros

Resolves: #850117
This commit is contained in:
Jan Safranek 2012-08-27 10:52:26 +02:00
parent abb5607a38
commit ba1e66b08d

View File

@ -96,64 +96,31 @@ fi
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post bmc-watchdog %post bmc-watchdog
if [ $1 -eq 1 ] ; then %systemd_post bmc-watchdog.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun bmc-watchdog %preun bmc-watchdog
if [ $1 -eq 0 ] ; then %systemd_preun bmc-watchdog.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable bmc-watchdog.service > /dev/null 2>&1 || :
/bin/systemctl stop bmc-watchdog.service > /dev/null 2>&1 || :
fi
%postun bmc-watchdog %postun bmc-watchdog
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart bmc-watchdog.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart bmc-watchdog.service >/dev/null 2>&1 || :
fi
%post ipmiseld %post ipmiseld
if [ $1 -eq 1 ] ; then %systemd_post ipmiseld.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun ipmiseld %preun ipmiseld
if [ $1 -eq 0 ] ; then %systemd_preun ipmiseld.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable ipmiseld.service > /dev/null 2>&1 || :
/bin/systemctl stop ipmiseld.service > /dev/null 2>&1 || :
fi
%postun ipmiseld %postun ipmiseld
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart ipmiseld.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ipmiseld.service >/dev/null 2>&1 || :
fi
%post ipmidetectd %post ipmidetectd
if [ $1 -eq 1 ] ; then %systemd_post ipmidetectd.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun ipmidetectd %preun ipmidetectd
if [ $1 -eq 0 ] ; then %systemd_preun ipmidetectd.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable ipmidetectd.service > /dev/null 2>&1 || :
/bin/systemctl stop ipmidetectd.service > /dev/null 2>&1 || :
fi
%postun ipmidetectd %postun ipmidetectd
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart ipmidetectd.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ipmidetectd.service >/dev/null 2>&1 || :
fi
%triggerun -- freeipmi-bmc-watchdog < 1.1.1-2 %triggerun -- freeipmi-bmc-watchdog < 1.1.1-2
# Save the current service runlevel info # Save the current service runlevel info
@ -390,6 +357,7 @@ fi
%changelog %changelog
* Mon Aug 27 2012 Jan Safranek <jsafrane@redhat.com> - 1.2.1-1 * Mon Aug 27 2012 Jan Safranek <jsafrane@redhat.com> - 1.2.1-1
- Reworked RPM scriptlets to use systemd-rpm macros (#850117).
- Updated to freeipmi-1.2.1: - Updated to freeipmi-1.2.1:
- Support new ipmiseld daemon, a daemon that regularly polls the SEL - Support new ipmiseld daemon, a daemon that regularly polls the SEL
and stores the events to the local syslog. and stores the events to the local syslog.