diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-11-05 15:28:18 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-11-05 16:11:47 +0100 |
commit | 021fa432447bd7b447ca39738040698db39d751b (patch) | |
tree | 66c0e46dfd952ce6de6043916f3eb9e2d92e62e2 /scripts/ifdown.sh |
Initial commitv1
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'scripts/ifdown.sh')
-rw-r--r-- | scripts/ifdown.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/ifdown.sh b/scripts/ifdown.sh new file mode 100644 index 0000000..e6f4500 --- /dev/null +++ b/scripts/ifdown.sh @@ -0,0 +1,8 @@ +#!/bin/sh +for IFPATH in /sys/class/net/*; do + [ "$IFPATH" == "/sys/class/net/lo" ] && continue + + IF=`basename $IFPATH` + + ip link set dev "$IF" down +done |