diff --git a/wizard/config/configure.sh b/wizard/config/configure.sh index c98e92f..d6b2fb5 100644 --- a/wizard/config/configure.sh +++ b/wizard/config/configure.sh @@ -8,15 +8,58 @@ source /opt/vyatta/etc/functions/script-template configure -source test.sh -#source firewall.sh -#source interfaces.sh -#source nat.sh -#source qos.sh -#source service.sh -#source system.sh +echo "===== Configure firewall... =====" +{ + source firewall.sh +} || { + echo "===== Failed to configure firewall =====" +} + +echo "===== Configure interfaces... =====" +{ + source interfaces.sh +} || { + echo "===== Failed to configure interfaces =====" +} + +echo "===== Configure NAT... =====" +{ + source nat.sh +} || { + echo "===== Failed to configure NAT =====" +} + +echo "===== Configure QoS... =====" +{ + source qos.sh +} || { + echo "===== Failed to configure QoS =====" +} + + +echo "===== Configure services... =====" +{ + source service.sh +} || { + echo "===== Failed to configure services =====" +} + + +echo "===== Configure system... =====" +{ + source system.sh +} || { + echo "===== Failed to configure system =====" +} + compare -commit -save -exit \ No newline at end of file + +{ # try commit, save + commit && save +} || { # catch, exit discard and print a very basic error message + exit discard + echo "Failed to commit and save the configuration." +} + +exit diff --git a/wizard/config/test.sh b/wizard/config/test.sh index 36ed07f..abaf2bb 100644 --- a/wizard/config/test.sh +++ b/wizard/config/test.sh @@ -1,3 +1,3 @@ #!/bin/vbash -set system task-scheduler task update-nat-reflection interval '30' \ No newline at end of file +set system task-scheduler task update-nat-reflection interval '30'