]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add module btrfs
authorHarald Hoyer <harald@redhat.com>
Tue, 13 Apr 2010 12:03:05 +0000 (14:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 13 Apr 2010 13:22:36 +0000 (15:22 +0200)
modules.d/90btrfs/40-btrfs.rules [new file with mode: 0644]
modules.d/90btrfs/check [new file with mode: 0755]
modules.d/90btrfs/install [new file with mode: 0755]
modules.d/95udev-rules/install

diff --git a/modules.d/90btrfs/40-btrfs.rules b/modules.d/90btrfs/40-btrfs.rules
new file mode 100644 (file)
index 0000000..e74ba1a
--- /dev/null
@@ -0,0 +1,7 @@
+SUBSYSTEM!="block", GOTO="btrfs_end"
+ACTION!="add|change", GOTO="btrfs_end"
+
+ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/btrfs device scan $env{DEVNAME}"
+
+LABEL="btrfs_end"
+
diff --git a/modules.d/90btrfs/check b/modules.d/90btrfs/check
new file mode 100755 (executable)
index 0000000..2897d46
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# We depend on udev-rules being loaded
+[ "$1" = "-d" ] && exit 0
+
+# if we don't have dmraid installed on the host system, no point
+# in trying to support it in the initramfs.
+which btrfs >/dev/null 2>&1 || exit 1
+
+exit 0
diff --git a/modules.d/90btrfs/install b/modules.d/90btrfs/install
new file mode 100755 (executable)
index 0000000..130a84d
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+inst_rules "$moddir/40-btrfs.rules"
+dracut_install btrfs
index ae64f3ed39aa9d3bb62a5f6524914c3b982cebcc..23693fe72b5603b8d0358613e3df7a3dd8ff16a5 100755 (executable)
@@ -24,7 +24,7 @@ else
     inst_rules "$moddir/59-persistent-storage-volid.rules"
 fi
 inst_rules "$moddir/61-persistent-storage.rules"
-    
+
 for i in \
 ata_id \
 cdrom_id \