9226bc
[Unit]
9226bc
Description=Send OS shutdown event to BMC
9226bc
Documentation=man:bmc-device
9226bc
RefuseManualStart=true
9226bc
DefaultDependencies=no
9226bc
Before=shutdown.target
9226bc
ConditionFileIsExecutable=/usr/sbin/bmc-device
9226bc
9226bc
[Service]
9226bc
Type=oneshot
9226bc
# IPMI v2.0 rev 1.1 Table 42-3.
9226bc
#    OS Stop / Shutdown: 0x20; "OS Graceful Shutdown": 0x03
9226bc
Environment="STOP_EVENT=0x41 0x04 0x20 0x01 0x6f assertion 0x03 0x00 0x00"
9226bc
ExecStart=/usr/sbin/bmc-device --platform-event=${STOP_EVENT}
9226bc
9226bc
[Install]
9226bc
WantedBy=shutdown.target