tests: add mock static executor

This commit is contained in:
Ariadne Conill 2020-07-26 02:37:28 -06:00
parent 987e6399de
commit 0669e897fd

18
tests/executors/static Normal file
View 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