1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Do not call ip binary with hardcoded path
On new systems is ip binary in /usr/bin/ instead of /sbin/.
As netplug script explicitly sets $PATH with both /usr/bin/ and /sbin/
directories, do not call ip binary with hardcode path and instead call ip
binary without explicit path.
https://bugs.debian.org/1076624
diff --git a/scripts/netplug b/scripts/netplug
index e1d16d5505a3..87b37a840c67 100755
--- a/scripts/netplug
+++ b/scripts/netplug
@@ -34,7 +34,7 @@ in)
out)
if [ -x /sbin/ifdown ]; then
# At least on Fedora Core 1, the call to ip addr flush infloops
- # /sbin/ifdown "$dev" && exec /sbin/ip addr flush "$dev"
+ # /sbin/ifdown "$dev" && ip addr flush "$dev"
exec /sbin/ifdown "$dev"
else
echo "Please teach me how to unplug an interface!" 1>&2
@@ -42,7 +42,7 @@ out)
fi
;;
probe)
- exec /sbin/ip link set "$dev" up >/dev/null 2>&1
+ exec ip link set "$dev" up >/dev/null 2>&1
;;
*)
echo "I have been called with a funny action of '%s'!" 1>&2
|