Hi Charles, One other issue:
> +ConditionPathExistsGlob=/dev/ipmi* There are multiple drivers available besides the kernel driver. So I don't think this should be a requirement? Al On Wed, 2015-12-09 at 13:34 -0800, Albert Chu wrote: > Hi Charles, > > I was wondering what is the use and or need for these systemd scripts. > They seem to be for "convenience". Perhaps there are some tools that > search for these events specifically. > > There's nothing wrong with them being for convenience, but if they are, > they should perhaps not be installed by default. Perhaps a configure > option could be run to enable their installation instead (and > subsequently they might be in a sub-rpm in the spec file, etc.). > > Al > > On Wed, 2015-12-09 at 14:01 -0600, charles_r...@dell.com wrote: > > Include systemd units that send OS start and shutdown events. > > > > Signed-off-by: Charles Rose <charles_r...@dell.com> > > --- > > etc/Makefile.am | 6 ++++++ > > etc/os-shutdown-event.service | 19 +++++++++++++++++++ > > etc/os-startup-event.service | 18 ++++++++++++++++++ > > 3 files changed, 43 insertions(+) > > create mode 100644 etc/os-shutdown-event.service > > create mode 100644 etc/os-startup-event.service > > > > diff --git a/etc/Makefile.am b/etc/Makefile.am > > index 699072f..a5ca85b 100644 > > --- a/etc/Makefile.am > > +++ b/etc/Makefile.am > > @@ -5,6 +5,8 @@ EXTRA_DIST = \ > > bmc-watchdog.service \ > > ipmidetectd.service \ > > ipmiseld.service \ > > + os-startup-event.service \ > > + os-shutdown-event.service \ > > bmc-watchdog.sysconfig \ > > ipmidetect.conf \ > > ipmidetectd.conf \ > > @@ -35,6 +37,8 @@ install-systemd-scripts: install-sysconfig > > $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.service > > $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service > > $(INSTALL) -m 755 $(srcdir)/ipmidetectd.service > > $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service > > $(INSTALL) -m 755 $(srcdir)/ipmiseld.service > > $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service > > + $(INSTALL) -m 644 $(srcdir)/os-startup-event.service > > $(DESTDIR)$(systemdsystemunitdir)/os-startup-event.service > > + $(INSTALL) -m 644 $(srcdir)/os-shutdown-event.service > > $(DESTDIR)$(systemdsystemunitdir)/os-shutdown-event.service > > > > install-sysconfig: > > $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/sysconfig > > @@ -59,3 +63,5 @@ uninstall-systemd-local: > > $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service > > $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service > > $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service > > + $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/os-startup-event.service > > + $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/os-shutdown-event.service > > diff --git a/etc/os-shutdown-event.service b/etc/os-shutdown-event.service > > new file mode 100644 > > index 0000000..b9bcf34 > > --- /dev/null > > +++ b/etc/os-shutdown-event.service > > @@ -0,0 +1,19 @@ > > +[Unit] > > +Description=Send OS shutdown event to BMC > > +Documentation=man:bmc-device > > +RefuseManualStart=true > > +DefaultDependencies=no > > +Before=shutdown.target > > + > > +ConditionFileIsExecutable=/usr/sbin/bmc-device > > +ConditionPathExistsGlob=/dev/ipmi* > > + > > +[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/etc/os-startup-event.service b/etc/os-startup-event.service > > new file mode 100644 > > index 0000000..8a567ef > > --- /dev/null > > +++ b/etc/os-startup-event.service > > @@ -0,0 +1,18 @@ > > +[Unit] > > +Description=Send OS startup event to BMC > > +Documentation=man:bmc-device > > +RefuseManualStart=true > > + > > +ConditionFileIsExecutable=/usr/sbin/bmc-device > > +ConditionPathExistsGlob=/dev/ipmi* > > + > > +[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 > -- > Albert Chu > ch...@llnl.gov > Computer Scientist > High Performance Systems Division > Lawrence Livermore National Laboratory > > > > _______________________________________________ > Freeipmi-devel mailing list > Freeipmi-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/freeipmi-devel -- Albert Chu ch...@llnl.gov Computer Scientist High Performance Systems Division Lawrence Livermore National Laboratory _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@gnu.org https://lists.gnu.org/mailman/listinfo/freeipmi-devel