summaryrefslogtreecommitdiff
path: root/etc/bash_completion.d/vyatta-op
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-08-02 19:41:42 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-08-02 19:41:42 -0500
commit91fe0a2b6b73a817296caa88ee7ce518c813ff6a (patch)
treed4a31a4c167555458b4d666d107801f1259018b7 /etc/bash_completion.d/vyatta-op
parent0a889b5701a6502dd12572e7fc24b6a1904de885 (diff)
downloadvyatta-op-91fe0a2b6b73a817296caa88ee7ce518c813ff6a.tar.gz
vyatta-op-91fe0a2b6b73a817296caa88ee7ce518c813ff6a.zip
Add support for unambiguous top level commands for unpriviledged users
Diffstat (limited to 'etc/bash_completion.d/vyatta-op')
-rw-r--r--etc/bash_completion.d/vyatta-op10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 340c316..c1aa50d 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -68,8 +68,8 @@ declare _vyatta_comptype
declare -x -a reply
declare -a _vyatta_operator_allowed
-if [[ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/users" ]]; then
- _vyatta_operator_allowed=( $(cat /opt/vyatta/etc/shell/level/users/allowed-op) )
+if [[ "$VYATTA_USER_LEVEL_DIR" != "/opt/vyatta/etc/shell/level/admin" ]]; then
+ _vyatta_operator_allowed=( $(cat $VYATTA_USER_LEVEL_DIR/allowed-op) )
fi
#source /etc/bash_completion.d/vyatta-op-run
@@ -444,7 +444,11 @@ if [ "$_OFR_CONFIGURE" == "ok" ]; then
return 0
fi
-_vyatta_op_init $@
+if [[ "$VYATTA_USER_LEVEL_DIR" != "/opt/vyatta/etc/shell/level/admin" ]]; then
+ vyatta_unpriv_init $@
+else
+ _vyatta_op_init $@
+fi
### Local Variables:
### mode: shell-script