diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-31 16:47:42 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-31 16:47:42 +0200 |
commit | c3fbeed8234d660b713b9dcdb3cdb80e1e7ff804 (patch) | |
tree | 5973abce6cc52130f6580ea321dd2829ee409b18 /package/cfgfs/src | |
parent | 2f66ec3afbb9a9470b6408ec161d379eb901247c (diff) |
check if user is root
Diffstat (limited to 'package/cfgfs/src')
-rw-r--r-- | package/cfgfs/src/fwcf.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh index ad75ee79e..c19e6240c 100644 --- a/package/cfgfs/src/fwcf.sh +++ b/package/cfgfs/src/fwcf.sh @@ -3,7 +3,7 @@ # Copyright (c) 2006, 2007 # Thorsten Glaser <tg@mirbsd.de> # Copyright (c) 2009 -# Waldemar Brodkorb <openadk@waldemar-brodkorb.de> +# Waldemar Brodkorb <wbx@openadk.org> # # Provided that these terms and disclaimer and all copyright notices # are retained or reproduced in an accompanying document, permission @@ -44,7 +44,13 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin wd=$(pwd) cd / -what='Configuration Filesystem (cfgfs), Version 1.06' +what='Configuration Filesystem Utility (cfgfs), Version 1.06' + +who=$(id -u) +if [ $who -ne 0 ]; + echo 'Exit. Configuration Filesystem Utility must be run as root.' + exit 1 +fi usage() { cat >&2 <<EOF @@ -109,6 +115,7 @@ EOF exit 1 ;; esac +# find backend device uname=$(uname -m) if [[ "$uname" = "i586" ]];then part=/dev/sda2 |