Skip to content

Commit

Permalink
fix(dracut-systemd): run systemctl daemon-reload after remove_hostonl…
Browse files Browse the repository at this point in the history
…y_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.
  • Loading branch information
aafeijoo-suse authored and johannbg committed Nov 11, 2022
1 parent 60c4b2f commit e1058b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules.d/98dracut-systemd/dracut-cmdline.sh
Expand Up @@ -11,6 +11,7 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
if ! getargbool 1 'rd.hostonly'; then
[ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
remove_hostonly_files
systemctl --no-block daemon-reload
[ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
fi

Expand Down

0 comments on commit e1058b0

Please sign in to comment.