Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
DEVPATH=/xyz/openbmc_project/watchdog/host0
|
||||
SERVICE=xyz.openbmc_project.Watchdog
|
||||
UNIT_HARD_RESET=phosphor-host-watchdog-reset.service
|
||||
UNIT_POWER_OFF=phosphor-host-watchdog-poweroff.service
|
||||
UNIT_POWER_CYCLE=phosphor-host-watchdog-powercycle.service
|
||||
FALLBACK_ACTION=xyz.openbmc_project.State.Watchdog.Action.PowerCycle
|
||||
FALLBACK_INTERVAL=180000
|
||||
MIN_INTERVAL=60000
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Power Cycle Host Server
|
||||
After=xyz.openbmc_project.Chassis.Control.Power.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
|
||||
ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Shutdown Host Server
|
||||
After=xyz.openbmc_project.Chassis.Control.Power.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Reset Host Server
|
||||
After=xyz.openbmc_project.Chassis.Control.Power.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=busctl set-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s xyz.openbmc_project.State.Host.Transition.ForceWarmReboot
|
||||
ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Phosphor Watchdog
|
||||
|
||||
[Service]
|
||||
EnvironmentFile={envfiledir}/obmc/watchdog/%I
|
||||
ExecStart=/usr/bin/env phosphor-watchdog --service=${{SERVICE}} --path=${{DEVPATH}} \
|
||||
--continue --fallback_always --min_interval=${{MIN_INTERVAL}} \
|
||||
--fallback_action=${{FALLBACK_ACTION}} --fallback_interval=${{FALLBACK_INTERVAL}} \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=${{UNIT_HARD_RESET}} \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=${{UNIT_POWER_OFF}} \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=${{UNIT_POWER_CYCLE}}
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
BusName=xyz.openbmc_project.Watchdog
|
||||
Type=dbus
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
@@ -0,0 +1,13 @@
|
||||
FILESEXTRAPATHS:prepend:gbs := "${THISDIR}/${PN}:"
|
||||
|
||||
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs = " obmc/watchdog/host0"
|
||||
OBMC_HOST_WATCHDOG_INSTANCES_A = "host0"
|
||||
WATCHDOG_FMT_A = "phosphor-watchdog@{0}.service"
|
||||
SYSTEMD_OVERRIDE:${PN}:remove:gbs = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
|
||||
SYSTEMD_LINK:${PN}:remove:gbs = "${@compose_list(d, 'ENABLE_WATCHDOG_FMT', 'OBMC_HOST_INSTANCES')}"
|
||||
SYSTEMD_LINK:${PN}:remove:gbs = "${@compose_list(d, 'WATCHDOG_FMT', 'OBMC_HOST_WATCHDOG_INSTANCES', 'OBMC_HOST_INSTANCES')}"
|
||||
SYSTEMD_SERVICE:${PN}:gbs = " ${@compose_list(d, 'WATCHDOG_FMT_A', 'OBMC_HOST_WATCHDOG_INSTANCES_A')} \
|
||||
phosphor-host-watchdog-reset.service \
|
||||
phosphor-host-watchdog-poweroff.service \
|
||||
phosphor-host-watchdog-powercycle.service \
|
||||
"
|
||||
Reference in New Issue
Block a user