summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-08-20 10:28:14 +0200
committerHarald Hoyer <harald@redhat.com>2013-08-20 10:28:14 +0200
commit3411ad661a27643834d6394949b25583ba8c34eb (patch)
tree8d142f4c5c77b876291ae058dd044ca32795fd4e
parenta2b64e30b808f6f0bb8d9311f80b3ed4669e0ab6 (diff)
downloaddracut-3411ad661a27643834d6394949b25583ba8c34eb.tar.gz
dracut-3411ad661a27643834d6394949b25583ba8c34eb.tar.bz2
dracut-3411ad661a27643834d6394949b25583ba8c34eb.zip
add persistent_policy configuration option
-rwxr-xr-xdracut-functions.sh2
-rw-r--r--dracut.conf.5.asc5
-rwxr-xr-xdracut.sh3
3 files changed, 8 insertions, 2 deletions
diff --git a/dracut-functions.sh b/dracut-functions.sh
index e1159898..1d70bd00 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -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/* \
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
index 22bbafde..a32516c4 100644
--- a/dracut.conf.5.asc
+++ b/dracut.conf.5.asc
@@ -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.
diff --git a/dracut.sh b/dracut.sh
index 5ac66b04..3ae3874c 100755
--- 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