sys-fs/lvm2: revbump 2.02.166 to fix #609416
authorMarc Schiffbauer <mschiff@gentoo.org>
Sat, 18 Feb 2017 21:28:37 +0000 (22:28 +0100)
committerMarc Schiffbauer <mschiff@gentoo.org>
Sat, 18 Feb 2017 21:29:48 +0000 (22:29 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

sys-fs/lvm2/files/lvm.rc-2.02.166-r2 [moved from sys-fs/lvm2/files/lvm.rc-2.02.166-r1 with 91% similarity]
sys-fs/lvm2/lvm2-2.02.166-r2.ebuild [moved from sys-fs/lvm2/lvm2-2.02.166-r1.ebuild with 99% similarity]

similarity index 91%
rename from sys-fs/lvm2/files/lvm.rc-2.02.166-r1
rename to sys-fs/lvm2/files/lvm.rc-2.02.166-r2
index e779d2fb09e50516757eb631193fc547fd8a95d3..d14292c2c4818cbab141adacb6a9b5565967a50c 100644 (file)
@@ -18,6 +18,12 @@ _need_lvmetad()
        ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
 }
 
+_need_lvmlockd()
+{
+       local lvm_path="$(_get_lvm_path)"
+       [ ! -x "${lvm_path}" ] && return 1
+       ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
+}
 depend() {
        before checkfs fsck
        after modules device-mapper
@@ -33,6 +39,9 @@ depend() {
                if _need_lvmetad; then
                        _need="${_need} lvmetad"
                fi
+               if _need_lvmlockd; then
+                       _need="${_need} lvmlockd"
+               fi
        fi
        need sysfs ${_need}
 }
@@ -77,8 +86,10 @@ start() {
                        lvm_commands="${lvm_commands}vgscan --mknodes\n"
                        # And turn them on!
                        lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
-                       # Start lockd VGs as required
-                       lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"
+                       if _need_lvmlockd; then
+                               # Start lockd VGs as required
+                               lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"
+                       fi
                        # Order of this is important, have to work around dash and LVM readline
                        printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
                        eend $? "Failed to setup the LVM"
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
rename to sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
index 8be6acbd8f0b910f2938a339a72d566b8ba7afd1..89fbbd63bb0b4ae6b5111c7623a5e65d5e669f69 100644 (file)
@@ -246,7 +246,7 @@ src_install() {
 
        if use !device-mapper-only ; then
                newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-               newinitd "${FILESDIR}"/lvm.rc-2.02.166-r1 lvm
+               newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm
                newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
 
                newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring