]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Use 'btrfs' command rather than 'btrfsctl', and install btrfs driver
authorWill Woods <wwoods@redhat.com>
Tue, 8 Mar 2011 23:35:15 +0000 (18:35 -0500)
committerHarald Hoyer <harald@redhat.com>
Wed, 9 Mar 2011 11:09:29 +0000 (12:09 +0100)
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.

modules.d/90btrfs/80-btrfs.rules
modules.d/90btrfs/module-setup.sh

index 92c855367e3f94dfc5ff1fce579b0748e01b1642..7c98d986d32ab7621e9a75ce306cdd8858505bc3 100644 (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"
 
index 0503e1d5e9bfd84e3966e1e370bcbefd6c8f8c23..765d9609212f45f104a1a4b9d64c0beb8809be43 100755 (executable)
@@ -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
 }
 
+installkernel() {
+    instmods btrfs
+}
+
 install() {
     inst_rules "$moddir/80-btrfs.rules"
-    dracut_install btrfsctl
+    dracut_install btrfs
 }