tests: add mock static executor
This commit is contained in:
parent
987e6399de
commit
0669e897fd
1 changed files with 18 additions and 0 deletions
18
tests/executors/static
Normal file
18
tests/executors/static
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$PHASE" in
|
||||||
|
up)
|
||||||
|
cmd="add"
|
||||||
|
;;
|
||||||
|
down)
|
||||||
|
cmd="del"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for i in $(ifquery -p address -i $INTERFACES_FILE $IFACE); do
|
||||||
|
echo ip addr $cmd $i dev $IFACE
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in $(ifquery -p gateway -i $INTERFACES_FILE $IFACE); do
|
||||||
|
echo ip route $cmd default via $i
|
||||||
|
done
|
Loading…
Reference in a new issue