Describe the bug
modules.d/99shutdown/shutdown.sh unconditionally prints warn "Killing all remaining processes" on every shutdown, even when no processes need to be killed. This produces unnecessary warning noise on the console during clean shutdowns.
The warning was introduced in commit 551c2dd (Jan 2013) and was historically invisible because older dracut versions (e.g. 048) had a less reliable console redirect. Since version 051, the improved console redirect logic (echo </dev/console subshell check) makes the warning reliably visible.
Distribution used
Ubuntu 22.04 (Jammy)
Dracut version
051-1
Init system
systemd
To Reproduce
- Boot any dracut 051+ system
- Run
shutdown -r now while watching the console
The warning appears every time regardless of system state.
Frequency: 3/3 (100% reproducible)
Expected behavior
Clean shutdown should not display any warnings when there are no remaining processes to kill.
Additional context
Current code (modules.d/99shutdown/shutdown.sh ~line 45):
warn "Killing all remaining processes"
killall_proc_mountpoint /oldroot || sleep 0.2
Proposed fix:
if ! killall_proc_mountpoint /oldroot; then
warn "Killed remaining processes using /oldroot"
sleep 0.2
fi
killall_proc_mountpoint returns 1 when it kills processes and 0 when none are found, so the warning and sleep should only be triggered when there are actually processes to kill.
Describe the bug
modules.d/99shutdown/shutdown.shunconditionally printswarn "Killing all remaining processes"on every shutdown, even when no processes need to be killed. This produces unnecessary warning noise on the console during clean shutdowns.The warning was introduced in commit
551c2dd(Jan 2013) and was historically invisible because older dracut versions (e.g. 048) had a less reliable console redirect. Since version 051, the improved console redirect logic (echo </dev/consolesubshell check) makes the warning reliably visible.Distribution used
Ubuntu 22.04 (Jammy)
Dracut version
051-1
Init system
systemd
To Reproduce
shutdown -r nowwhile watching the consoleThe warning appears every time regardless of system state.
Frequency: 3/3 (100% reproducible)
Expected behavior
Clean shutdown should not display any warnings when there are no remaining processes to kill.
Additional context
Current code (
modules.d/99shutdown/shutdown.sh~line 45):Proposed fix:
killall_proc_mountpointreturns 1 when it kills processes and 0 when none are found, so the warning and sleep should only be triggered when there are actually processes to kill.