${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
if _need_lvmetad; then
_need="${_need} lvmetad"
fi
+ if _need_lvmlockd; then
+ _need="${_need} lvmlockd"
+ fi
fi
need sysfs ${_need}
}
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"
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