diff options
author | Reto Buerki <reet@codelabs.ch> | 2012-12-06 17:00:15 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 15:22:10 +0100 |
commit | fb2aab414af644a73e0dcca99215fa18f57a503f (patch) | |
tree | 8e37889eda66f298aede3a9d54a7b89e6428b8b9 /testing/scripts/build-baseimage | |
parent | b86866579ab3054a21120bca00b4bdfe8c8e575d (diff) | |
download | strongswan-fb2aab414af644a73e0dcca99215fa18f57a503f.tar.bz2 strongswan-fb2aab414af644a73e0dcca99215fa18f57a503f.tar.xz |
Use red color in die() function
This is the function where red color SHOULD be used.
Diffstat (limited to 'testing/scripts/build-baseimage')
-rwxr-xr-x | testing/scripts/build-baseimage | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/testing/scripts/build-baseimage b/testing/scripts/build-baseimage index de247786b..08da30f08 100755 --- a/testing/scripts/build-baseimage +++ b/testing/scripts/build-baseimage @@ -1,16 +1,14 @@ #!/bin/bash -if [ `id -u` != 0 ]; -then - echo "! you must be root to run $0" - exit -fi +echo "Building base image" DIR=`dirname $0` . $DIR/function.sh -[ -f $DIR/../testing.conf ] || die "!! Configuration file 'testing.conf' not found" +[ `id -u` -eq 0 ] || die "You must be root to run $0" + +[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found" . $DIR/../testing.conf # additional packages @@ -26,7 +24,6 @@ mkdir -p $CACHEDIR rm -f $ROOTFS echo "`date`, building $ROOTFS" >>$LOGFILE -echo "Building base image" log_action "Creating image $ROOTFS" execute "dd if=/dev/null of=$ROOTFS bs=1M seek=$ROOTFSSIZE count=1" |