* [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path
@ 2015-02-09 13:05 Imre Palik
2015-02-09 14:52 ` Lars Ellenberg
0 siblings, 1 reply; 2+ messages in thread
From: Imre Palik @ 2015-02-09 13:05 UTC (permalink / raw)
To: drbd-dev; +Cc: Lars Ellenberg, Palik, Imre, Philipp Reisner
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path
2015-02-09 13:05 [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path Imre Palik
@ 2015-02-09 14:52 ` Lars Ellenberg
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ellenberg @ 2015-02-09 14:52 UTC (permalink / raw)
To: Imre Palik; +Cc: Palik, Imre, Philipp Reisner, drbd-dev
On Mon, Feb 09, 2015 at 02:05:38PM +0100, Imre Palik wrote:
> From: "Palik, Imre" <imrep@amazon.de>
>
> This change removes the dependance of the service on wether /sbin is
> in the path or not.
If you are NOT root,
this will not work anyways.
If you ARE root,
/sbin (or your local equivalent) is supposed to be in your path.
There are deployments out there
that have these tools not in /sbin but elsewhere.
Lars
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-09 14:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 13:05 [Drbd-dev] [PATCH] drbd-utils: drbd service: specifying commands from /sbin/ with absolute path Imre Palik
2015-02-09 14:52 ` Lars Ellenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox