old-firewall/fw.sh

54 lines
611 B
Bash
Raw Normal View History

#!/bin/bash
2013-03-11 01:24:06 +00:00
set -o errexit
set -o pipefail
set -o nounset
fw_usage() {
2013-03-11 02:39:18 +00:00
echo "${0} <apply|restore|test>"
2013-03-11 01:24:06 +00:00
}
fw_apply() {
:
}
fw_restore() {
:
}
fw_test() {
2013-03-11 02:39:18 +00:00
for test_script in $(dirname ${0})/*; do
echo -n "[test] $(basename ${0}): "
[[ -x ${test_script} ]] && ${test_script}
echo "OK"
done
2013-03-11 01:24:06 +00:00
}
fw_flush() {
:
}
if [[ $# -gt 1 ]]; then
fw_usage
exit 1
fi
case $1 in
apply)
fw_apply
;;
restore)
fw_restore
;;
test)
fw_restore
;;
*)
fw_usage
exit 1
;;
esac
exit 0
2013-03-11 01:24:06 +00:00