Services
system.services
Protects against dangerous service operations like stopping critical services and modifying init configuration
- 11blocking rules
- 7safe patterns
- 4Critical
- 7High
[packs]
enabled = ["system.services"]Evaluated when a command contains systemctl, service, init, upstart, shutdown, reboot, modprobe, rmmod.
Blocking rules
Each rule ID is system.services:<name>. Use it in allowlists and [policy.rules].
Criticalinit-levelinit 0 shuts down, init 6 reboots the system.
Explanation
Changing the init level to 0 halts the system and to 6 reboots it. This is the legacy SysV method for power management and takes effect immediately. All processes are killed and the machine goes down. On systemd systems, prefer: systemctl poweroff (instead of init 0) systemctl reboot (instead of init 6) Check current runlevel: runlevel
Criticalrebootreboot will restart the system.
Explanation
Reboot restarts the machine immediately. All processes are terminated, connections are dropped, and the system goes through a full restart cycle. Any unsaved work is lost and services will be briefly unavailable. Check uptime and load before deciding: uptime For a delayed reboot with notice: shutdown -r +5 "Rebooting in 5 minutes"
Criticalshutdownshutdown will power off or restart the system.
Explanation
The shutdown command powers off or restarts the machine. All running processes receive SIGTERM then SIGKILL, all filesystems are unmounted, and the system goes down. Remote users lose access immediately. To cancel a pending shutdown: shutdown -c To schedule with warning: shutdown +10 "System going down for maintenance"
Criticalsystemctl-powersystemctl poweroff/reboot/halt will shut down or restart the system.
Explanation
This immediately initiates a system power state change. Poweroff and halt shut down the machine, reboot restarts it, and suspend/hibernate save state to RAM or disk. Any unsaved work, running processes, or active connections will be interrupted. Check who is logged in: who Schedule a graceful shutdown instead: shutdown +5 "Rebooting for maintenance"
Highmodprobe-removeUnloading a kernel module on a running host can crash or wedge the kernel.
Explanation
Removing a driver from a live kernel is not a safe reset. Unloading a GPU/DRM driver (nvidia, amdgpu, i915, ...) tears down the framebuffer console; on some kernels that teardown Oopses while holding the console lock, after which every new terminal, every tty close and `ps aux` hang in uninterruptible sleep until the machine is rebooted. Storage and network drivers can take their devices down with them. An nvidia-smi "driver/library version mismatch" means userspace was upgraded under a loaded module: schedule a reboot instead. Inspect without changing anything: lsmod modinfo <module> modprobe -n -v -r <module> (dry run)
HighrmmodUnloading a kernel module on a running host can crash or wedge the kernel.
Explanation
rmmod removes a driver from the running kernel. Unloading GPU/DRM, storage or network drivers can Oops the kernel or leave the console and tty layer wedged until reboot. Inspect without changing anything: lsmod modinfo <module>
Highservice-stop-criticalStopping critical services can cause system access loss.
Explanation
The legacy 'service' command stops a critical service immediately. Stopping sshd terminates remote access, stopping networking drops all connections. If you are connected remotely, you may be unable to reconnect. Check status first: service <name> status Prefer systemctl on systemd systems: systemctl status <name>
Highssh-remote-module-unloadUnloading a kernel module on a remote host can crash or wedge its kernel.
Explanation
The remote command unloads a kernel module (modprobe -r / rmmod). Unloading GPU/DRM, storage or network drivers on a running host can Oops the kernel or leave the console and tty layer wedged until reboot.
Highsystemctl-isolatesystemctl isolate changes the system state significantly.
Explanation
Isolating a target stops all services not required by that target. For example, isolating rescue.target drops to single-user mode, stopping networking, display managers, and most daemons. This is equivalent to changing the runlevel and can be very disruptive. Check current target: systemctl get-default List active targets: systemctl list-units --type=target
Highsystemctl-stopsystemctl stop/disable/mask affects service availability. Verify service name.
Explanation
Stopping a service immediately terminates it; disabling prevents it from starting at boot; masking makes it impossible to start even manually. Each has different severity and reversibility. Check what depends on the service: systemctl list-dependencies --reverse <service> To temporarily stop without disabling: systemctl stop <service> (restarts on reboot)
Highsystemctl-stop-criticalStopping/disabling critical services can cause system access loss or outage.
Explanation
Stopping, disabling, or masking a critical system service can lock you out of the machine or cause cascading failures. For example, stopping sshd severs remote access, stopping networking drops all connections, and stopping docker kills every running container. Check current state first: systemctl status <service> If you need to restart rather than stop: systemctl restart <service>
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
systemctl-statussystemctl-listsystemctl-showsystemctl-issystemctl-reloadsystemctl-catjournalctl