summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-07-30 00:26:06 +0200
committerDaniil Baturin <daniil@baturin.org>2014-07-30 00:26:06 +0200
commitebf888c342bbdf8d2d8af175974c378fc8968a7f (patch)
tree68a8fc07bc627bb08cf402dd8537ef9359db371c
parentd3b5d7b9d7e93d17d532806f8440bac2f0698baf (diff)
downloadvyatta-cfg-system-ebf888c342bbdf8d2d8af175974c378fc8968a7f.tar.gz
vyatta-cfg-system-ebf888c342bbdf8d2d8af175974c378fc8968a7f.zip
Replace login check with UID check in install-get-partition.
-rwxr-xr-xscripts/install/install-get-partition6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index f6ddb830..eee0dc73 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -1,8 +1,8 @@
#!/bin/bash
-if [ `whoami` != 'root' ] ; then
- echo "This script must be run with root privileges."
- exit 1
+if [ $(id -u) != 0 ]; then
+ echo "Drive partitioning requires root privileges!"
+ exit 1
fi
# this script will write the partition type, selected partition, and selected