add persistent_policy configuration option
authorHarald Hoyer <harald@redhat.com>
Tue, 20 Aug 2013 08:28:14 +0000 (10:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 20 Aug 2013 08:28:14 +0000 (10:28 +0200)
dracut-functions.sh
dracut.conf.5.asc
dracut.sh

index e1159898ebf633c283cbd0226706d5b2f48cec88..1d70bd0051f8e6da9d86627743b44211ebb527b5 100755 (executable)
@@ -305,7 +305,7 @@ get_persistent_dev() {
 
     for i in \
         /dev/mapper/* \
-        /dev/disk/$persistent_policy/* \
+        /dev/disk/${persistent_policy:-by-uuid}/* \
         /dev/disk/by-uuid/* \
         /dev/disk/by-label/* \
         /dev/disk/by-partuuid/* \
index 22bbafdecba35da22404d198c278abd6a9866eb0..a32516c49b6ac41f27209659f3f1ebd456f725b1 100644 (file)
@@ -71,6 +71,11 @@ Configuration files must have the extension .conf; other extensions are ignored.
     Host-Only mode: Install only what is needed for booting the local host
     instead of a generic host and generate host-specific configuration.
 
+*persistent_policy=*"__<policy>__"::
+    Use _<policy>_ to address disks and partitions.
+    _<policy>_ can be any directory name found in /dev/disk.
+    E.g. "by-uuid", "by-label"
+
 *tmpdir=*"__<temporary directory>__"::
     Specify temporary directory to use.
 
index 5ac66b041c9ecadd5f3ea1d8b2373cf128b9cc2e..3ae3874c419c020dc8468f139f2ba9f0d197c161 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -416,7 +416,7 @@ while :; do
         -N|--no-hostonly|--no-host-only)
                        hostonly_l="no" ;;
         --persistent-policy)
-                       persistent_policy="$2"; shift;;
+                       persistent_policy_l="$2"; shift;;
         --fstab)       use_fstab_l="yes" ;;
         -h|--help)     long_usage; exit 1 ;;
         -i|--include)  push include_src "$2"
@@ -656,6 +656,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
 [[ $prefix_l ]] && prefix=$prefix_l
 [[ $prefix = "/" ]] && unset prefix
 [[ $hostonly_l ]] && hostonly=$hostonly_l
+[[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l
 [[ $use_fstab_l ]] && use_fstab=$use_fstab_l
 [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
 [[ $lvmconf_l ]] && lvmconf=$lvmconf_l