]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut-systemd): rootfs-generator cannot write outside of generator dir
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 8 Mar 2023 07:25:38 +0000 (08:25 +0100)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 10 May 2023 12:10:01 +0000 (08:10 -0400)
commit86c8a5a7c2573645e67537fb9975efab808d42c9
tree25e479f0c86121cb0beb16029eba4b01b8506626
parentacfa793b5cc035ebd36b0c5ce97ba2fd89e5745c
fix(dracut-systemd): rootfs-generator cannot write outside of generator dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
https://github.com/systemd/systemd/commit/ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue #2211
Fixes issue #2225
modules.d/98dracut-systemd/module-setup.sh
modules.d/98dracut-systemd/parse-root.sh [new file with mode: 0755]
modules.d/98dracut-systemd/rootfs-generator.sh