feat(power): shutdown_host through HostShutdownMixin, 0.25.0 (NetOrk/netork#2841)
The host's clean shutdown next to reboot_host: /sbin/poweroff as root, detached and two seconds late like the restart, so the exit status comes back before the session drops. A refusal raises RuntimeError with what the host said, plus the sudo password hint where sudo wanted one. poweroff rather than shutdown -h now: systemd links it to systemctl poweroff, sysvinit and BusyBox ship it themselves, while BusyBox has no shutdown and sysvinit's -h may only halt.
This commit is contained in:
1 parent
a8c57a61e4
commit
f876ac4598
5 files changed
+83
-8
No files matched your search
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.25.0] - 2026-11-29
|
||||
|
||||
### Added
|
||||
- `shutdown_host()` (napalm-device-types' `HostShutdownMixin`): the host's clean shutdown,
|
||||
next to `reboot_host` (NetOrk/netork#2841). `/sbin/poweroff` as root, detached and two
|
||||
seconds late like the restart, so the exit status comes back before the session drops;
|
||||
a refusal raises `RuntimeError` with what the host said. `poweroff` rather than
|
||||
`shutdown -h now`, because BusyBox (Alpine) has no `shutdown` and sysvinit's `-h` may
|
||||
only halt. OpenMediaVault and QNAP have it through `LinuxDriver`.
|
||||
|
||||
## [0.24.0] - 2026-11-28
|
||||
|
||||
### Added
|
||||
|
||||
Reference in new issue
Block a user