From: Henrik Gombos Date: Mon, 21 Feb 2022 02:40:02 +0000 (-0500) Subject: fix(base): do not require chroot inside initramfs X-Git-Tag: 058~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=518133714b769160448a51c512d5e152ea6332da;p=thirdparty%2Fdracut.git fix(base): do not require chroot inside initramfs dracut can be invoked inside a chroot, but inside the generated initramfs the chroot binary is not required. add chroot to the generated initramfs if debug or selinux dracut modules are enabled. --- diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh index 2d6c59820..3124f1af3 100755 --- a/modules.d/95debug/module-setup.sh +++ b/modules.d/95debug/module-setup.sh @@ -14,7 +14,7 @@ depends() { # called by dracut install() { inst_multiple -o ls ps grep more cat rm strace free showmount df du lsblk \ - ping netstat rpcinfo vi scp ping6 ssh find \ + ping netstat rpcinfo vi scp ping6 ssh find chroot \ tcpdump cp dd less hostname mkdir systemd-analyze \ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck diff --git a/modules.d/98selinux/module-setup.sh b/modules.d/98selinux/module-setup.sh index b3f0fb6ab..3574b1221 100755 --- a/modules.d/98selinux/module-setup.sh +++ b/modules.d/98selinux/module-setup.sh @@ -13,5 +13,5 @@ depends() { # called by dracut install() { inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh" - inst_multiple setenforce + inst_multiple setenforce chroot } diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index d5fb8bad6..54b0deb91 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -13,7 +13,7 @@ depends() { # called by dracut install() { - inst_multiple mount mknod mkdir sleep chroot chown \ + inst_multiple mount mknod mkdir sleep chown \ sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid \ modprobe chmod tr