diff --git a/src/boot/dracut/module-setup.sh b/src/boot/dracut/module-setup.sh index 06d74600e3..408f20d3c6 100755 --- a/src/boot/dracut/module-setup.sh +++ b/src/boot/dracut/module-setup.sh @@ -24,7 +24,7 @@ installkernel() { } check() { - if [[ -x $systemdutildir/systemd ]] && [[ -x /usr/lib/ostree/ostree-prepare-root ]]; then + if [[ -x $systemdutildir/systemd ]] && [[ -x "${dracutsysrootdir-}/usr/lib/ostree/ostree-prepare-root" ]]; then return 255 fi @@ -36,14 +36,14 @@ depends() { } install() { - dracut_install /usr/lib/ostree/ostree-prepare-root - for r in /usr/lib /etc; do + dracut_install "${dracutsysrootdir-}/usr/lib/ostree/ostree-prepare-root" + for r in "${dracutsysrootdir-}/usr/lib" "${dracutsysrootdir-}/etc"; do if test -f "$r/ostree/prepare-root.conf"; then inst_simple "$r/ostree/prepare-root.conf" fi done - if test -f "/etc/ostree/initramfs-root-binding.key"; then - inst_simple "/etc/ostree/initramfs-root-binding.key" + if test -f "${dracutsysrootdir-}/etc/ostree/initramfs-root-binding.key"; then + inst_simple "${dracutsysrootdir-}/etc/ostree/initramfs-root-binding.key" fi inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service" mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"