Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Imre Palik <imrep.amz@gmail.com>
To: drbd-dev@lists.linbit.com
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>,
	"Palik, Imre" <imrep@amazon.de>,
	Philipp Reisner <philipp.reisner@linbit.com>
Subject: [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path
Date: Mon,  9 Feb 2015 14:05:38 +0100	[thread overview]
Message-ID: <1423487138-6971-1-git-send-email-imrep.amz@gmail.com> (raw)

From: "Palik, Imre" <imrep@amazon.de>

This change removes the dependance of the service on wether /sbin is
in the path or not.

Signed-off-by: Imre Palik <imrep@amazon.de>
---
 scripts/drbd |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/drbd b/scripts/drbd
index b6b0a2c..482c69d 100755
--- a/scripts/drbd
+++ b/scripts/drbd
@@ -27,6 +27,8 @@ DRBDSETUP="drbdsetup"
 PROC_DRBD="/proc/drbd"
 MODPROBE="/sbin/modprobe"
 RMMOD="/sbin/rmmod"
+UDEVADM="/sbin/udevadm"
+UDEVSETTLE="/sbin/udevsettle"
 UDEV_TIMEOUT=10
 ADD_MOD_PARAM=""
 
@@ -120,13 +122,13 @@ drbd_pretty_status()
 # But don't wait too long.
 _udev_settle()
 {
-	if udevadm version ; then
+	if $UDEVADM version ; then
 		# ok, we have udevadm, use it.
-		udevadm settle --timeout=5
+		$UDEVADM settle --timeout=5
 	else
 		# if udevsettle is not there,
 		# no matter.
-		udevsettle --timeout=5
+		$UDEVSETTLE --timeout=5
 	fi
 }
 
-- 
1.7.9.5


             reply	other threads:[~2015-02-09 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 13:05 Imre Palik [this message]
2015-02-09 14:52 ` [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path Lars Ellenberg

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=1423487138-6971-1-git-send-email-imrep.amz@gmail.com \
    --to=imrep.amz@gmail.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=imrep@amazon.de \
    --cc=lars.ellenberg@linbit.com \
    --cc=philipp.reisner@linbit.com \
    /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