summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-04-14 19:40:16 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-04-14 20:34:18 +0200
commit3958b1dd77ce75c3d2077acc62b4babc8419a9e6 (patch)
tree97f5fed1d03f7f89101a670c1b8003c25edab80e /sys-fs/lvm2
parentsys-fs/lvm2: runscript: save complete USE (diff)
downloadgentoo-3958b1dd77ce75c3d2077acc62b4babc8419a9e6.tar.gz
gentoo-3958b1dd77ce75c3d2077acc62b4babc8419a9e6.tar.bz2
gentoo-3958b1dd77ce75c3d2077acc62b4babc8419a9e6.zip
sys-fs/lvm2: runscript: unify $lvm_path handling
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.18717
1 files changed, 6 insertions, 11 deletions
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187
index daafffd5b28b..1bf8002b9dab 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.187
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.187
@@ -71,12 +71,10 @@ start() {
# NOTE: Add needed modules for LVM or RAID, etc
# to /etc/modules.autoload if needed
+
lvm_path="$(_get_lvm_path)"
- for lvm_path in /bin/lvm /sbin/lvm ; do
- [ -x "${lvm_path}" ] && break
- done
- if [ ! -x "${lvm_path}" ] ; then
- eerror "Cannot find lvm binary in /sbin or /bin!"
+ if [ -z "${lvm_path}" ] ; then
+ eerror "Failed to find lvm binary in /bin or /sbin!"
return 1
fi
if [ -z "${CDBOOT}" ] ; then
@@ -121,12 +119,9 @@ start_post() {
}
stop() {
- for lvm_path in /bin/lvm /sbin/lvm ; do
- [ -x "${lvm_path}" ] && break
- done
-
- if [ ! -x "${lvm_path}" ] ; then
- eerror "Cannot find lvm binary in /sbin or /bin!"
+ lvm_path="$(_get_lvm_path)"
+ if [ -z "${lvm_path}" ] ; then
+ eerror "Failed to find lvm binary in /bin or /sbin!"
return 1
fi