Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/env.sh
diff options
context:
space:
mode:
Diffstat (limited to 'env.sh')
-rwxr-xr-xenv.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/env.sh b/env.sh
index 62e66ea..30851a0 100755
--- a/env.sh
+++ b/env.sh
@@ -17,6 +17,20 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
+check_root () {
+ echo "Checking for root permissions"
+ if [ `whoami` != root ]; then
+ echo $0 ": Need to run as root. Stopping."
+ exit
+ fi
+ echo "[OK]"
+}
+
+# Installation function
+installenv () {
+ check_root
+ exit
+}
# Help message
usage () {
@@ -29,9 +43,6 @@ usage () {
#Check for arguments
case $1 in
- help)
- usage
- ;;
install)
installenv
;;
@@ -40,4 +51,4 @@ case $1 in
;;
esac
-usage()
+usage