dracut/0040-removed-old-udev-vol_id.patch
Harald Hoyer 35271e26a2 dracut-018-74.git20120522
- new upstream version
2012-05-22 11:49:50 +02:00

132 lines
5.0 KiB
Diff

From cce69be6681e288a8354a39380be8a4493edde5d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 7 May 2012 16:27:48 +0200
Subject: [PATCH] removed old udev "vol_id"
---
dracut-functions.sh | 11 -----------
dracut.asc | 3 +--
modules.d/90dmraid/module-setup.sh | 4 +---
modules.d/90mdraid/module-setup.sh | 14 ++++++--------
modules.d/95udev-rules/59-persistent-storage-volid.rules | 7 -------
modules.d/95udev-rules/module-setup.sh | 9 ++-------
6 files changed, 10 insertions(+), 38 deletions(-)
delete mode 100644 modules.d/95udev-rules/59-persistent-storage-volid.rules
diff --git a/dracut-functions.sh b/dracut-functions.sh
index ff4e16d..8256e02 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -183,17 +183,6 @@ get_fs_env() {
return 1
fi
- # Fallback, for the old vol_id
- if [[ -x /lib/udev/vol_id ]]; then
- if evalstr=$(/lib/udev/vol_id --export $1 \
- | while read line; do
- strstr "$line" "ID_FS_TYPE=" && { echo $line; exit 0;}
- done;) ; then
- eval $evalstr
- [[ $ID_FS_TYPE ]] && return 0
- fi
- fi
-
# Fallback, if we don't have udev information
if find_binary blkid >/dev/null; then
eval $(blkid -o udev $1 \
diff --git a/dracut.asc b/dracut.asc
index a6e050d..6d93379 100644
--- a/dracut.asc
+++ b/dracut.asc
@@ -478,8 +478,7 @@ command
# dmsetup ls --tree
----
+
-* A list of block device attributes including vol_id compatible mode. This can
-be obtained by running the commands:
+* A list of block device attributes. This can be obtained by running the commands:
+
----
# blkid -p
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
index 0a8ed7f..5ce7051 100755
--- a/modules.d/90dmraid/module-setup.sh
+++ b/modules.d/90dmraid/module-setup.sh
@@ -58,9 +58,7 @@ install() {
inst "$moddir/dmraid.sh" /sbin/dmraid_scan
- if [ ! -x /lib/udev/vol_id ]; then
- inst_rules 64-md-raid.rules
- fi
+ inst_rules 64-md-raid.rules
inst_libdir_file "libdmraid-events*.so*"
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index 90092a7..7c9fcc4 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -57,14 +57,12 @@ install() {
# inst /etc/passwd
# inst /etc/group
- if [ ! -x /lib/udev/vol_id ]; then
- inst_rules 64-md-raid.rules
- # remove incremental assembly from stock rules, so they don't shadow
- # 65-md-inc*.rules and its fine-grained controls, or cause other problems
- # when we explicitly don't want certain components to be incrementally
- # assembled
- sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}/lib/udev/rules.d/64-md-raid.rules"
- fi
+ inst_rules 64-md-raid.rules
+ # remove incremental assembly from stock rules, so they don't shadow
+ # 65-md-inc*.rules and its fine-grained controls, or cause other problems
+ # when we explicitly don't want certain components to be incrementally
+ # assembled
+ sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}/lib/udev/rules.d/64-md-raid.rules"
inst_rules "$moddir/65-md-incremental-imsm.rules"
diff --git a/modules.d/95udev-rules/59-persistent-storage-volid.rules b/modules.d/95udev-rules/59-persistent-storage-volid.rules
deleted file mode 100644
index 0b798e6..0000000
--- a/modules.d/95udev-rules/59-persistent-storage-volid.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBSYSTEM!="block", GOTO="psv_end"
-ACTION!="add|change", GOTO="psv_end"
-ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", IMPORT{program}="vol_id --export $tempnode"
-KERNEL=="cciss[0-9]*", IMPORT{program}="vol_id --export $tempnode"
-KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
-KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"
-LABEL="psv_end"
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index b4acce3..f7f9f2e 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -37,12 +37,8 @@ install() {
inst_dir /run/udev
inst_dir /run/udev/rules.d
- if [ ! -x /lib/udev/vol_id ]; then
- dracut_install blkid
- inst_rules "$moddir/59-persistent-storage.rules"
- else
- inst_rules "$moddir/59-persistent-storage-volid.rules"
- fi
+ dracut_install blkid
+ inst_rules "$moddir/59-persistent-storage.rules"
inst_rules "$moddir/61-persistent-storage.rules"
for _i in \
@@ -60,7 +56,6 @@ install() {
input_id \
scsi_id \
usb_id \
- vol_id \
pcmcia-socket-startup \
pcmcia-check-broken-cis \
; do