Use 'btrfs' command rather than 'btrfsctl', and install btrfs driver

btrfsctl is being replaced by the btrfs command in the upstream
tools, so change accordingly. Also, if we're using the btrfs module
we should probably make sure the btrfs driver gets installed.
master
Will Woods 2011-03-08 18:35:15 -05:00 committed by Harald Hoyer
parent dfec8467b9
commit a5e33c7d6f
2 changed files with 10 additions and 6 deletions

View File

@ -2,7 +2,7 @@ SUBSYSTEM!="block", GOTO="btrfs_end"
ACTION!="add|change", GOTO="btrfs_end"

ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/modprobe btrfs"
ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/btrfsctl -A $env{DEVNAME}"
ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/btrfs device scan $env{DEVNAME}"

LABEL="btrfs_end"


View File

@ -3,9 +3,9 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh

check() {
# if we don't have btrfs (btrfsctl) installed on the host system,
# if we don't have btrfs installed on the host system,
# no point in trying to support it in the initramfs.
type -P btrfsctl >/dev/null || return 1
type -P btrfs >/dev/null || return 1

. $dracutfunctions
[[ $debug ]] && set -x
@ -27,8 +27,12 @@ depends() {
return 0
}

install() {
inst_rules "$moddir/80-btrfs.rules"
dracut_install btrfsctl
installkernel() {
instmods btrfs
}

install() {
inst_rules "$moddir/80-btrfs.rules"
dracut_install btrfs
}