summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-28 18:26:43 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-28 18:26:43 -0800
commit6d47ae87c9d2d2f9dbc3bbea10114e618272a29a (patch)
tree6606a8c9cf06c3076e9aa031047643343b98a00c
parent4c75d7d54d28d1af48b9ae07fe0889c5386c7c44 (diff)
downloadvyatta-cfg-6d47ae87c9d2d2f9dbc3bbea10114e618272a29a.tar.gz
vyatta-cfg-6d47ae87c9d2d2f9dbc3bbea10114e618272a29a.zip
fix for bug 2924: set admin flag for root
-rw-r--r--etc/default/vyatta-cfg4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/default/vyatta-cfg b/etc/default/vyatta-cfg
index dfb4006..ef02233 100644
--- a/etc/default/vyatta-cfg
+++ b/etc/default/vyatta-cfg
@@ -33,6 +33,10 @@ for g in "${groups[@]}"; do
is_users=1
fi
done
+# root is also admin
+if [ "$(id -u)" == 0 ]; then
+ is_admin=1
+fi
# check level from high to low
if [ $is_admin == 1 ]; then
declare -x -r VYATTA_USER_LEVEL_DIR=${vyatta_sysconfdir}/shell/level/admin