From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/
Date: Tue, 14 Apr 2020 18:34:51 +0000 (UTC) [thread overview]
Message-ID: <1586889258.3958b1dd77ce75c3d2077acc62b4babc8419a9e6.whissi@gentoo> (raw)
commit: 3958b1dd77ce75c3d2077acc62b4babc8419a9e6
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 14 17:40:16 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 18:34:18 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3958b1dd
sys-fs/lvm2: runscript: unify $lvm_path handling
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
sys-fs/lvm2/files/lvm.rc-2.02.187 | 17 ++++++-----------
1 file 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 daafffd5b28..1bf8002b9da 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
next reply other threads:[~2020-04-14 18:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 18:34 Thomas Deutschmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-01 18:16 [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/ Conrad Kostecki
2022-10-30 9:28 Sam James
2020-06-07 4:41 Aaron Bauman
2020-04-14 18:34 Thomas Deutschmann
2020-04-14 18:34 Thomas Deutschmann
2020-04-14 18:34 Thomas Deutschmann
2020-04-14 18:34 Thomas Deutschmann
2019-04-17 7:26 Robin H. Johnson
2019-02-27 5:35 Aaron Bauman
2018-08-05 1:11 Thomas Deutschmann
2018-08-04 22:34 Thomas Deutschmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1586889258.3958b1dd77ce75c3d2077acc62b4babc8419a9e6.whissi@gentoo \
--to=whissi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox