]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90lvm/module-setup.sh: ignore DM_UDEV_DISABLE_DISK_RULES_FLAG=1
authorHarald Hoyer <harald@redhat.com>
Fri, 30 Mar 2012 08:48:37 +0000 (10:48 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 30 Mar 2012 08:48:37 +0000 (10:48 +0200)
Ignore logical volumes, which have DM_UDEV_DISABLE_DISK_RULES_FLAG=1
set for the generation of hostonly cmdline parameter.

modules.d/90lvm/module-setup.sh

index c40dd29371df704cbec4063a75e350c652f620d5..cf46372ebe298c5cc3c3dacc305a60cf56954f6b 100755 (executable)
@@ -11,9 +11,9 @@ check() {
     [[ $debug ]] && set -x
 
     check_lvm() {
-        unset DM_VG_NAME
-        unset DM_LV_NAME
-        eval $(udevadm info --query=property --name=$1|egrep '(DM_VG_NAME|DM_LV_NAME)=')
+        local DM_VG_NAME DM_LV_NAME DM_UDEV_DISABLE_DISK_RULES_FLAG
+        eval $(udevadm info --query=property --name=$1|egrep '(DM_VG_NAME|DM_LV_NAME|DM_UDEV_DISABLE_DISK_RULES_FLAG)=')
+        [[ "$DM_UDEV_DISABLE_DISK_RULES_FLAG" = "1" ]] && return 1
         [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1
         if ! strstr " ${_activated[*]} " " ${DM_VG_NAME}/${DM_LV_NAME} "; then
             if ! [[ $kernel_only ]]; then