From f27c4dcde0014d844ed6a31f3322dcadfd1ad255 Mon Sep 17 00:00:00 2001 From: Arno Schoenmakers <schoenmakers@astron.nl> Date: Mon, 24 Nov 2008 22:37:27 +0000 Subject: [PATCH] bug 1285: Added options -s to only print level, no list --- MAC/APL/APLCommon/src/swlevel | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAC/APL/APLCommon/src/swlevel b/MAC/APL/APLCommon/src/swlevel index 3e54a1b1709..cd8506460e0 100755 --- a/MAC/APL/APLCommon/src/swlevel +++ b/MAC/APL/APLCommon/src/swlevel @@ -267,6 +267,14 @@ if [ -z "$1" ]; then exit fi +# argument s or -s only returns level, no list + +if [ "$1" = "s" -o "$1" = "-s" ]; then + level=`cat /tmp/level.admin` + echo $level + exit +fi + # don't allow root to run swlevel because all logfile get root access. user=`id | cut -d'(' -f2 | cut -d')' -f1` echo $user -- GitLab