|
Harald Hoyer |
12f4d5 |
From 58ffd15bfffddd593b1a8f29eb5935a0ce39d2dc Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
12f4d5 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
12f4d5 |
Date: Tue, 13 Apr 2010 14:03:05 +0200
|
|
Harald Hoyer |
12f4d5 |
Subject: [PATCH 05/15] add module btrfs
|
|
Harald Hoyer |
12f4d5 |
|
|
Harald Hoyer |
12f4d5 |
---
|
|
Harald Hoyer |
12f4d5 |
modules.d/90btrfs/40-btrfs.rules | 7 +++++++
|
|
Harald Hoyer |
12f4d5 |
modules.d/90btrfs/check | 10 ++++++++++
|
|
Harald Hoyer |
12f4d5 |
modules.d/90btrfs/install | 4 ++++
|
|
Harald Hoyer |
12f4d5 |
modules.d/95udev-rules/install | 2 +-
|
|
Harald Hoyer |
12f4d5 |
4 files changed, 22 insertions(+), 1 deletions(-)
|
|
Harald Hoyer |
12f4d5 |
create mode 100644 modules.d/90btrfs/40-btrfs.rules
|
|
Harald Hoyer |
12f4d5 |
create mode 100755 modules.d/90btrfs/check
|
|
Harald Hoyer |
12f4d5 |
create mode 100755 modules.d/90btrfs/install
|
|
Harald Hoyer |
12f4d5 |
|
|
Harald Hoyer |
12f4d5 |
diff --git a/modules.d/90btrfs/40-btrfs.rules b/modules.d/90btrfs/40-btrfs.rules
|
|
Harald Hoyer |
12f4d5 |
new file mode 100644
|
|
Harald Hoyer |
12f4d5 |
index 0000000..e74ba1a
|
|
Harald Hoyer |
12f4d5 |
--- /dev/null
|
|
Harald Hoyer |
12f4d5 |
+++ b/modules.d/90btrfs/40-btrfs.rules
|
|
Harald Hoyer |
12f4d5 |
@@ -0,0 +1,7 @@
|
|
Harald Hoyer |
12f4d5 |
+SUBSYSTEM!="block", GOTO="btrfs_end"
|
|
Harald Hoyer |
12f4d5 |
+ACTION!="add|change", GOTO="btrfs_end"
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/btrfs device scan $env{DEVNAME}"
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+LABEL="btrfs_end"
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
diff --git a/modules.d/90btrfs/check b/modules.d/90btrfs/check
|
|
Harald Hoyer |
12f4d5 |
new file mode 100755
|
|
Harald Hoyer |
12f4d5 |
index 0000000..2897d46
|
|
Harald Hoyer |
12f4d5 |
--- /dev/null
|
|
Harald Hoyer |
12f4d5 |
+++ b/modules.d/90btrfs/check
|
|
Harald Hoyer |
12f4d5 |
@@ -0,0 +1,10 @@
|
|
Harald Hoyer |
12f4d5 |
+#!/bin/bash
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+# We depend on udev-rules being loaded
|
|
Harald Hoyer |
12f4d5 |
+[ "$1" = "-d" ] && exit 0
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+# if we don't have dmraid installed on the host system, no point
|
|
Harald Hoyer |
12f4d5 |
+# in trying to support it in the initramfs.
|
|
Harald Hoyer |
12f4d5 |
+which btrfs >/dev/null 2>&1 || exit 1
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+exit 0
|
|
Harald Hoyer |
12f4d5 |
diff --git a/modules.d/90btrfs/install b/modules.d/90btrfs/install
|
|
Harald Hoyer |
12f4d5 |
new file mode 100755
|
|
Harald Hoyer |
12f4d5 |
index 0000000..130a84d
|
|
Harald Hoyer |
12f4d5 |
--- /dev/null
|
|
Harald Hoyer |
12f4d5 |
+++ b/modules.d/90btrfs/install
|
|
Harald Hoyer |
12f4d5 |
@@ -0,0 +1,4 @@
|
|
Harald Hoyer |
12f4d5 |
+#!/bin/bash
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
+inst_rules "$moddir/40-btrfs.rules"
|
|
Harald Hoyer |
12f4d5 |
+dracut_install btrfs
|
|
Harald Hoyer |
12f4d5 |
diff --git a/modules.d/95udev-rules/install b/modules.d/95udev-rules/install
|
|
Harald Hoyer |
12f4d5 |
index ae64f3e..23693fe 100755
|
|
Harald Hoyer |
12f4d5 |
--- a/modules.d/95udev-rules/install
|
|
Harald Hoyer |
12f4d5 |
+++ b/modules.d/95udev-rules/install
|
|
Harald Hoyer |
12f4d5 |
@@ -24,7 +24,7 @@ else
|
|
Harald Hoyer |
12f4d5 |
inst_rules "$moddir/59-persistent-storage-volid.rules"
|
|
Harald Hoyer |
12f4d5 |
fi
|
|
Harald Hoyer |
12f4d5 |
inst_rules "$moddir/61-persistent-storage.rules"
|
|
Harald Hoyer |
12f4d5 |
-
|
|
Harald Hoyer |
12f4d5 |
+
|
|
Harald Hoyer |
12f4d5 |
for i in \
|
|
Harald Hoyer |
12f4d5 |
ata_id \
|
|
Harald Hoyer |
12f4d5 |
cdrom_id \
|
|
Harald Hoyer |
12f4d5 |
--
|
|
Harald Hoyer |
12f4d5 |
1.7.0.1
|
|
Harald Hoyer |
12f4d5 |
|