Skip to content

Commit

Permalink
fix(btrfs): add missing cmdline function
Browse files Browse the repository at this point in the history
Otherwise `dracut --print-cmdline` does not print the command line option added
by the btrfs module.
  • Loading branch information
aafeijoo-suse authored and LaszloGombos committed Jun 20, 2023
1 parent 2ff7b47 commit 2b47a2e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules.d/90btrfs/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}

0 comments on commit 2b47a2e

Please sign in to comment.