Otherwise `dracut --print-cmdline` does not print the command line option added
by the btrfs module.
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
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"
}