From 0669e897fdf596dca40c9bc504f8c44714dd9b00 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 26 Jul 2020 02:37:28 -0600 Subject: [PATCH] tests: add mock static executor --- tests/executors/static | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/executors/static diff --git a/tests/executors/static b/tests/executors/static new file mode 100644 index 0000000..b649c11 --- /dev/null +++ b/tests/executors/static @@ -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