Blame 0066-fixed-install-locations-for-udev-rules-and-change-to.patch

Harald Hoyer 811c04
From 24a38bc1cbe461c344ce61c7e10b6d51d5689c93 Mon Sep 17 00:00:00 2001
Harald Hoyer 811c04
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 811c04
Date: Fri, 27 Jul 2012 11:55:31 +0200
Harald Hoyer 811c04
Subject: [PATCH] fixed install locations for udev rules and change to
Harald Hoyer 811c04
 IMPORT{builtin}
Harald Hoyer 811c04
Harald Hoyer 811c04
---
Harald Hoyer 811c04
 modules.d/90btrfs/module-setup.sh                  | 3 ++-
Harald Hoyer 811c04
 modules.d/90dmraid/module-setup.sh                 | 3 ++-
Harald Hoyer 811c04
 modules.d/90mdraid/module-setup.sh                 | 6 ++++--
Harald Hoyer 811c04
 modules.d/90multipath/module-setup.sh              | 5 +++--
Harald Hoyer 811c04
 modules.d/95udev-rules/59-persistent-storage.rules | 8 ++++----
Harald Hoyer 811c04
 modules.d/95udev-rules/61-persistent-storage.rules | 2 +-
Harald Hoyer 811c04
 modules.d/99base/module-setup.sh                   | 4 +++-
Harald Hoyer 811c04
 7 files changed, 19 insertions(+), 12 deletions(-)
Harald Hoyer 811c04
Harald Hoyer 811c04
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
Harald Hoyer 811c04
index 22f3f1c..d2e559f 100755
Harald Hoyer 811c04
--- a/modules.d/90btrfs/module-setup.sh
Harald Hoyer 811c04
+++ b/modules.d/90btrfs/module-setup.sh
Harald Hoyer 811c04
@@ -33,6 +33,7 @@ install() {
Harald Hoyer 811c04
     inst_rules "$moddir/80-btrfs.rules"
Harald Hoyer 811c04
     inst_script "$moddir/btrfs_finished.sh" /sbin/btrfs_finished
Harald Hoyer 811c04
     inst_script "$moddir/btrfs_timeout.sh" /sbin/btrfs_timeout
Harald Hoyer 811c04
-    dracut_install btrfs btrfsck
Harald Hoyer 811c04
+    dracut_install btrfsck
Harald Hoyer 811c04
+    inst $(command -v btrfs) /sbin/btrfs
Harald Hoyer 811c04
 }
Harald Hoyer 811c04
 
Harald Hoyer 811c04
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
Harald Hoyer 811c04
index 10c732c..eb949dc 100755
Harald Hoyer 811c04
--- a/modules.d/90dmraid/module-setup.sh
Harald Hoyer 811c04
+++ b/modules.d/90dmraid/module-setup.sh
Harald Hoyer 811c04
@@ -52,7 +52,8 @@ depends() {
Harald Hoyer 811c04
 install() {
Harald Hoyer 811c04
     local _i
Harald Hoyer 811c04
     dracut_install dmraid
Harald Hoyer 811c04
-    dracut_install -o partx kpartx
Harald Hoyer 811c04
+    dracut_install -o kpartx
Harald Hoyer 811c04
+    inst $(command -v partx) /sbin/partx
Harald Hoyer 811c04
 
Harald Hoyer 811c04
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
Harald Hoyer 811c04
 
Harald Hoyer 811c04
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
Harald Hoyer 811c04
index 7b3c759..8522756 100755
Harald Hoyer 811c04
--- a/modules.d/90mdraid/module-setup.sh
Harald Hoyer 811c04
+++ b/modules.d/90mdraid/module-setup.sh
Harald Hoyer 811c04
@@ -43,8 +43,10 @@ installkernel() {
Harald Hoyer 811c04
 }
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 install() {
Harald Hoyer 811c04
-    dracut_install mdadm cat
Harald Hoyer 811c04
-    dracut_install -o mdmon partx
Harald Hoyer 811c04
+    dracut_install cat
Harald Hoyer 811c04
+    dracut_install -o mdmon
Harald Hoyer 811c04
+    inst $(command -v partx) /sbin/partx
Harald Hoyer 811c04
+    inst $(command -v mdadm) /sbin/mdadm
Harald Hoyer 811c04
 
Harald Hoyer 811c04
      # XXX: mdmon really needs to run as non-root?
Harald Hoyer 811c04
      #      If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group)
Harald Hoyer 811c04
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
Harald Hoyer 811c04
index f9c1f81..31d1108 100755
Harald Hoyer 811c04
--- a/modules.d/90multipath/module-setup.sh
Harald Hoyer 811c04
+++ b/modules.d/90multipath/module-setup.sh
Harald Hoyer 811c04
@@ -73,7 +73,6 @@ install() {
Harald Hoyer 811c04
     dracut_install -o  \
Harald Hoyer 811c04
         dmsetup \
Harald Hoyer 811c04
         kpartx \
Harald Hoyer 811c04
-        partx \
Harald Hoyer 811c04
         mpath_wait \
Harald Hoyer 811c04
         multipath  \
Harald Hoyer 811c04
         multipathd \
Harald Hoyer 811c04
@@ -83,10 +82,12 @@ install() {
Harald Hoyer 811c04
         /etc/multipath.conf \
Harald Hoyer 811c04
         /etc/multipath/*
Harald Hoyer 811c04
 
Harald Hoyer 811c04
+    inst $(command -v partx) /sbin/partx
Harald Hoyer 811c04
+
Harald Hoyer 811c04
     inst_libdir_file "libmultipath*" "multipath/*"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
     inst_hook pre-trigger 02 "$moddir/multipathd.sh"
Harald Hoyer 811c04
     inst_hook cleanup   02 "$moddir/multipathd-stop.sh"
Harald Hoyer 811c04
-    inst_rules 40-multipath.rules 65-multipath.rules 66-kpartx.rules
Harald Hoyer 811c04
+    inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules 66-kpartx.rules
Harald Hoyer 811c04
 }
Harald Hoyer 811c04
 
Harald Hoyer 811c04
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
Harald Hoyer 811c04
index 2b83e72..b7d069b 100644
Harald Hoyer 811c04
--- a/modules.d/95udev-rules/59-persistent-storage.rules
Harald Hoyer 811c04
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
Harald Hoyer 811c04
@@ -1,8 +1,8 @@
Harald Hoyer 811c04
 SUBSYSTEM!="block", GOTO="ps_end"
Harald Hoyer 811c04
 ACTION!="add|change", GOTO="ps_end"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
-KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
Harald Hoyer 811c04
-KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
Harald Hoyer 811c04
+KERNEL=="cciss[0-9]*", IMPORT{builtin}="blkid"
Harald Hoyer 811c04
+KERNEL=="nbd[0-9]*", IMPORT{builtin}="blkid"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
Harald Hoyer 811c04
@@ -19,7 +19,7 @@ ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
Harald Hoyer 811c04
 LABEL="md_ignore_state"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
Harald Hoyer 811c04
-IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
Harald Hoyer 811c04
+IMPORT{builtin}="blkid"
Harald Hoyer 811c04
 OPTIONS+="link_priority=100"
Harald Hoyer 811c04
 OPTIONS+="watch"
Harald Hoyer 811c04
 LABEL="md_end"
Harald Hoyer 811c04
@@ -32,7 +32,7 @@ ENV{DM_NAME}!="?*", GOTO="ps_end"
Harald Hoyer 811c04
 ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="ps_end"
Harald Hoyer 811c04
 ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="ps_end"
Harald Hoyer 811c04
 ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="ps_end"
Harald Hoyer 811c04
-IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
Harald Hoyer 811c04
+IMPORT{builtin}="blkid"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 LABEL="ps_end"
Harald Hoyer 811c04
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
Harald Hoyer 811c04
index 9cfdb0b..1136849 100644
Harald Hoyer 811c04
--- a/modules.d/95udev-rules/61-persistent-storage.rules
Harald Hoyer 811c04
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
Harald Hoyer 811c04
@@ -10,7 +10,7 @@ GOTO="pss_end"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 LABEL="do_pss"
Harald Hoyer 811c04
 # by-path (parent device path)
Harald Hoyer 811c04
-ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{program}="path_id %p"
Harald Hoyer 811c04
+ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id"
Harald Hoyer 811c04
 ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
Harald Hoyer 811c04
 ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
Harald Hoyer 811c04
 
Harald Hoyer 811c04
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
Harald Hoyer 811c04
index 097607a..22ab277 100755
Harald Hoyer 811c04
--- a/modules.d/99base/module-setup.sh
Harald Hoyer 811c04
+++ b/modules.d/99base/module-setup.sh
Harald Hoyer 811c04
@@ -13,8 +13,10 @@ depends() {
Harald Hoyer 811c04
 
Harald Hoyer 811c04
 install() {
Harald Hoyer 811c04
     local _d
Harald Hoyer 811c04
-    dracut_install mount mknod mkdir modprobe pidof sleep chroot \
Harald Hoyer 811c04
+    dracut_install mount mknod mkdir pidof sleep chroot \
Harald Hoyer 811c04
         sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid
Harald Hoyer 811c04
+    inst $(command -v modprobe) /sbin/modprobe
Harald Hoyer 811c04
+
Harald Hoyer 811c04
     dracut_install -o less
Harald Hoyer 811c04
     if [ ! -e "${initdir}/bin/sh" ]; then
Harald Hoyer 811c04
         dracut_install bash