90lvm/module-setup.sh: redirect error message of lvs to /dev/null
authorBaoquan He <bhe@redhat.com>
Thu, 13 Jun 2013 08:07:44 +0000 (16:07 +0800)
committerHarald Hoyer <harald@redhat.com>
Thu, 13 Jun 2013 13:49:20 +0000 (15:49 +0200)
Signed-off-by: Baoquan He <bhe@redhat.com>
modules.d/90lvm/module-setup.sh

index a51bb05..abec1de 100755 (executable)
@@ -41,7 +41,7 @@ install() {
             push _activated "${DM_VG_NAME}/${DM_LV_NAME}"
         fi
         if ! [[ $_needthin ]]; then
-            [[ $(lvs --noheadings -o segtype ${DM_VG_NAME}) == *thin* ]] && _needthin=1
+            [[ $(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null) == *thin* ]] && _needthin=1
         fi
 
         return 0