From: Antonio Alvarez Feijoo Date: Wed, 19 Apr 2023 07:25:34 +0000 (+0200) Subject: fix(btrfs): add missing cmdline function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b47a2efe91ab8be480925c04388200a3666812c;p=thirdparty%2Fdracut.git fix(btrfs): add missing cmdline function Otherwise `dracut --print-cmdline` does not print the command line option added by the btrfs module. --- diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh index 279ff1459..3a047053e 100755 --- a/modules.d/90btrfs/module-setup.sh +++ b/modules.d/90btrfs/module-setup.sh @@ -22,6 +22,13 @@ depends() { return 0 } +# called by dracut +cmdline() { + # Hack for slow machines + # see https://github.com/dracutdevs/dracut/issues/658 + printf " rd.driver.pre=btrfs" +} + # called by dracut installkernel() { instmods btrfs @@ -49,7 +56,6 @@ install() { inst_multiple -o btrfsck btrfs-zero-log inst "$(command -v btrfs)" /sbin/btrfs - # Hack for slow machines - # see https://github.com/dracutdevs/dracut/issues/658 - echo "rd.driver.pre=btrfs" > "${initdir}"/etc/cmdline.d/00-btrfs.conf + + printf "%s\n" "$(cmdline)" > "${initdir}/etc/cmdline.d/00-btrfs.conf" }