From be00cd5baaf22030b0ec1e6930208faa455ebb52 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:21:53 +0000 Subject: import freeipmi-1.2.9-8.el7 --- diff --git a/SOURCES/os-shutdown-event.service b/SOURCES/os-shutdown-event.service new file mode 100644 index 0000000..86c0704 --- /dev/null +++ b/SOURCES/os-shutdown-event.service @@ -0,0 +1,17 @@ +[Unit] +Description=Send OS shutdown event to BMC +Documentation=man:bmc-device +RefuseManualStart=true +DefaultDependencies=no +Before=shutdown.target +ConditionFileIsExecutable=/usr/sbin/bmc-device + +[Service] +Type=oneshot +# IPMI v2.0 rev 1.1 Table 42-3. +# OS Stop / Shutdown: 0x20; "OS Graceful Shutdown": 0x03 +Environment="STOP_EVENT=0x41 0x04 0x20 0x01 0x6f assertion 0x03 0x00 0x00" +ExecStart=/usr/sbin/bmc-device --platform-event=${STOP_EVENT} + +[Install] +WantedBy=shutdown.target diff --git a/SOURCES/os-startup-event.service b/SOURCES/os-startup-event.service new file mode 100644 index 0000000..aa74412 --- /dev/null +++ b/SOURCES/os-startup-event.service @@ -0,0 +1,16 @@ +[Unit] +Description=Send OS startup event to BMC +Documentation=man:bmc-device +RefuseManualStart=true +ConditionFileIsExecutable=/usr/sbin/bmc-device + +[Service] +Type=oneshot +# IPMI v2.0 rev 1.1 Table 42-3. +# Base OS Boot/Installation Status: 0x1f; "C: boot completed": 0x01 +Environment="START_EVENT=0x41 0x04 0x1f 0x01 0x6f assertion 0x01 0x00 0x00" +ExecStart=/usr/sbin/bmc-device --platform-event=${START_EVENT} + +[Install] +WantedBy=basic.target +Also=os-shutdown-event.service diff --git a/SPECS/freeipmi.spec b/SPECS/freeipmi.spec index 0e0e4f6..ff0b24f 100644 --- a/SPECS/freeipmi.spec +++ b/SPECS/freeipmi.spec @@ -3,7 +3,7 @@ Name: freeipmi Version: 1.2.9 -Release: 7%{?dist} +Release: 8%{?dist} Summary: IPMI remote console and system management software License: GPLv3+ Group: Applications/System @@ -12,6 +12,8 @@ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: bmc-watchdog.service Source2: ipmidetectd.service Source3: ipmiseld.service +Source4: os-shutdown-event.service +Source5: os-startup-event.service Patch1: freeipmi-1.2.1-bigendauth.patch BuildRequires: libgcrypt-devel texinfo systemd-units Requires(preun): info systemd-units @@ -78,20 +80,24 @@ echo freeipmi > $RPM_BUILD_ROOT%{_localstatedir}/lib/freeipmi/ipckey rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la # Install systemd units install -m 755 -d $RPM_BUILD_ROOT/%{_unitdir} -install -m 644 %SOURCE1 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_unitdir}/ +install -m 644 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 $RPM_BUILD_ROOT/%{_unitdir}/ # Remove initscripts rm -rf $RPM_BUILD_ROOT/%{_initrddir} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d %post /sbin/install-info %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir &>/dev/null || : /sbin/ldconfig +%systemd_post os-shutdown-event.service os-startup-event.service %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir &>/dev/null || : fi +%systemd_preun os-shutdown-event.service os-startup-event.service -%postun -p /sbin/ldconfig +%postun +/sbin/ldconfig +%systemd_postun_with_restart os-shutdown-event.service os-startup-event.service %post bmc-watchdog %systemd_post bmc-watchdog.service @@ -272,6 +278,8 @@ fi %{_mandir}/man5/libipmiconsole.conf.5* %{_mandir}/man7/freeipmi.7* %dir %{_localstatedir}/cache/ipmimonitoringsdrcache +%{_unitdir}/os-shutdown-event.service +%{_unitdir}/os-startup-event.service %files devel %dir %{_datadir}/doc/%{name}/contrib/libipmimonitoring @@ -349,6 +357,9 @@ fi %dir %{_localstatedir}/cache/ipmiseld %changelog +* Tue Jun 28 2016 Boris Ranto - 1.2.9-8 +- Package os event systemd services (#1122307) + * Mon Jul 06 2015 Ales Ledvinka - 1.2.9-7 - Big-Endian authentication fix. (#1189065)