From 7f2779df2bfd703f561ab542973c3128db7356d0 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 6 Apr 2009 11:51:07 -0700 Subject: add "save" command to cfg-cmd-wrapper --- scripts/vyatta-cfg-cmd-wrapper | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper index 518147d..8eddd5c 100755 --- a/scripts/vyatta-cfg-cmd-wrapper +++ b/scripts/vyatta-cfg-cmd-wrapper @@ -25,6 +25,9 @@ else export UNIONFS=unionfs fi +# permissions +## note: this script should be running as the vyattacfg group, e.g., with "sg". +## otherwise there may be permission problems with the files created. UMASK_SAVE=`umask` umask 0002 @@ -73,6 +76,10 @@ case "$1" in /opt/vyatta/sbin/my_commit RET_STATUS=$? ;; + save) + /opt/vyatta/sbin/vyatta-save-config.pl "${@:2}" + RET_STATUS=$? + ;; *) echo "Invalid command \"$1\" for vyatta-cfg-cmd-wrapper" RET_STATUS=1 -- cgit v1.2.3