]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests/topotests: Also search sbin for modprobe 3436/head
authorChristian Franke <chris@opensourcerouting.org>
Thu, 6 Dec 2018 17:31:34 +0000 (18:31 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Thu, 6 Dec 2018 17:33:21 +0000 (18:33 +0100)
We call `modprobe -n` to check if mpls modules are available to be
loaded. We do this as normal user, to only ask for root permissions
if we are actually loading the module.

This breaks if `modprobe` is in `/sbin` and normal users don't have
sbin in path.

So add `/sbin` to the search path to work around this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests/topotests/docker/frr-topotests.sh

index 673354f5dabb162ed436e32f7c9aa9aac6675693..c13262652b602b87922fe860df5e8064d1ed3552 100755 (executable)
@@ -80,6 +80,8 @@ fi
 # them from the host however, they can be used just fine.
 #
 
+export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
+
 for module in mpls-router mpls-iptunnel; do
        if modprobe -n $module 2> /dev/null; then
                :