From 4c0cb014d55882ed769a89d9d630bd1160d4ef54 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 25 Jun 2008 11:53:19 -0700 Subject: fixed non-root user access for discard. also moved help string. --- etc/bash_completion.d/20vyatta-cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'etc/bash_completion.d') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index d501019..f1d100e 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -76,8 +76,8 @@ discard () fi sudo umount ${VYATTA_TEMP_CONFIG_DIR}; - rm -fr ${VYATTA_CHANGES_ONLY_DIR}; - mkdir -p ${VYATTA_CHANGES_ONLY_DIR}; + sudo rm -fr ${VYATTA_CHANGES_ONLY_DIR}; + sudo mkdir -p ${VYATTA_CHANGES_ONLY_DIR}; sudo mount -t unionfs -o dirs=${VYATTA_CHANGES_ONLY_DIR}=rw:${VYATTA_ACTIVE_CONFIGURATION_DIR}=ro unionfs ${VYATTA_TEMP_CONFIG_DIR}; if (( changes )); then @@ -814,6 +814,7 @@ vyatta_config_complete () if (( ${#COMP_WORDS[@]} < 2 )); then declare -a hitems=( "commit" \ "delete" \ + "discard" \ "edit" \ "exit" \ "load" \ @@ -824,6 +825,7 @@ vyatta_config_complete () declare -a hstrs=( \ "Commit the current set of changes" \ "Delete a configuration element" \ + "Discard uncommitted changes" \ "Edit a sub-element" \ "Exit from this configuration level" \ "Load configuration from a file" \ -- cgit v1.2.3