[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freeipmi-devel] [PATCH v2] Send OS start and stop events to BMC
From: |
Albert Chu |
Subject: |
Re: [Freeipmi-devel] [PATCH v2] Send OS start and stop events to BMC |
Date: |
Mon, 04 Jan 2016 12:06:30 -0800 |
Hey Charles,
I think the patch is fine. But now that the unit files don't check
for /dev/ipmi*, shouldn't they be named without the "/dev/ipmi"??
Al
On Wed, 2015-12-30 at 14:06 -0600, address@hidden wrote:
> Include systemd units that send OS start and shutdown events.
>
> Signed-off-by: Charles Rose <address@hidden>
> ---
> Changes from v1:
> - Renamed systemd unit files to be more meaningful.
> - Removed check Condition for /dev/ipmi*
> - Removed Makefile defaults. Post acceptance of this patch, I will submit
> a separate patch that creates a sub-package containing these units.
>
> etc/os-shutdown-event-dev-ipmi.service | 17 +++++++++++++++++
> etc/os-startup-event-dev-ipmi.service | 16 ++++++++++++++++
> 2 files changed, 33 insertions(+)
> create mode 100644 etc/os-shutdown-event-dev-ipmi.service
> create mode 100644 etc/os-startup-event-dev-ipmi.service
>
> diff --git a/etc/os-shutdown-event-dev-ipmi.service
> b/etc/os-shutdown-event-dev-ipmi.service
> new file mode 100644
> index 0000000..99fc7ce
> --- /dev/null
> +++ b/etc/os-shutdown-event-dev-ipmi.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/etc/os-startup-event-dev-ipmi.service
> b/etc/os-startup-event-dev-ipmi.service
> new file mode 100644
> index 0000000..7546dfa
> --- /dev/null
> +++ b/etc/os-startup-event-dev-ipmi.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-dev-ipmi.service
--
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
- Re: [Freeipmi-devel] [PATCH v2] Send OS start and stop events to BMC,
Albert Chu <=