summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-17 08:55:56 +0100
committerGitHub <noreply@github.com>2023-12-17 08:55:56 +0100
commit483f83215d763134123ec6613c22e13b09726641 (patch)
treed22e460d94ab058afc90fed1e643dcabb69df6f0
parentf86d305d2cd638e70e64ef912d826aa1c448c29b (diff)
parent6ddafd315aade19f62903c5b749309e54e872ea9 (diff)
downloadvyatta-cfg-483f83215d763134123ec6613c22e13b09726641.tar.gz
vyatta-cfg-483f83215d763134123ec6613c22e13b09726641.zip
Merge pull request #69 from sever-sever/T5249
T5249: Add node rollback-soft
-rw-r--r--functions/interpreter/vyatta-cfg-run14
1 files changed, 14 insertions, 0 deletions
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run
index 50d6071..a13c62d 100644
--- a/functions/interpreter/vyatta-cfg-run
+++ b/functions/interpreter/vyatta-cfg-run
@@ -37,6 +37,7 @@ _vyatta_cfg_cmds=( "confirm" \
"merge" \
"rename" \
"rollback" \
+ "rollback-soft" \
"run" \
"save" \
"set" \
@@ -56,6 +57,7 @@ _vyatta_cfg_helps=( \
"Load configuration from a file and merge running configuration" \
"Rename a configuration element" \
"Rollback to a prior config revision (requires reboot)" \
+ "Rollback to a prior config revision (without reboot)" \
"Run an operational-mode command" \
"Save configuration to a file" \
"Set the value of a parameter or create a new element" \
@@ -212,6 +214,15 @@ vyatta_config_rollback ()
sudo ${vyos_bin_dir}/config-mgmt rollback --rev "$@"
}
+vyatta_config_rollback-soft ()
+{
+ if [ $# != 1 ]; then
+ echo "Error: must include a revision # to rollback to"
+ return 1;
+ fi
+ ${vyos_bin_dir}/config-mgmt rollback_soft --rev "$@"
+}
+
shutdown ()
{
echo "Exit from configure mode before shutting down system."
@@ -565,6 +576,7 @@ vyatta_cfg_run ()
commit) vyatta_config_commit "${@:2}";;
confirm) vyatta_config_confirm "${@:2}";;
rollback) vyatta_config_rollback "${@:2}";;
+ rollback-soft) vyatta_config_rollback-soft "${@:2}";;
commit-confirm) vyatta_config_commit-confirm "${@:2}";;
compare) vyatta_config_compare "${@:2}";;
save) vyatta_config_save "${@:2}" ;;
@@ -614,6 +626,8 @@ _vyatta_cfg_init ()
complete -F vyatta_compare_complete ${cmd:0:$pos} ;;
rollback)
complete -F vyatta_rollback_complete ${cmd:0:$pos} ;;
+ rollback-soft)
+ complete -F vyatta_rollback_complete ${cmd:0:$pos} ;;
commit|commit-confirm)
complete -F vyatta_commit_complete ${cmd:0:$pos} ;;
*)