Skip to content

Commit e1058b0

Browse files
aafeijoo-susejohannbg
authored andcommitted
fix(dracut-systemd): run systemctl daemon-reload after remove_hostonly_files
Dependencies to systemd .device unit files are marked as "hostonly" in the special file hostonly-files. These .device unit files can be removed using the `rd.hostonly=0` command line parameter. But, since systemd v252 (systemd/systemd#24054), the initrd-parse-etc.service service does not run `systemctl daemon-reload`, so systemd keeps waiting for these .device units to show up. This means that if a hostonly device is not available for any reason at boot time, using `rd.hostonly=0` has no effect and the system will not boot.
1 parent 60c4b2f commit e1058b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules.d/98dracut-systemd/dracut-cmdline.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
1111
if ! getargbool 1 'rd.hostonly'; then
1212
[ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
1313
remove_hostonly_files
14+
systemctl --no-block daemon-reload
1415
[ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
1516
fi
1617

0 commit comments

Comments
 (0)