From: rjones Date: Fri, 20 Mar 2009 15:59:55 +0000 (+0000) Subject: Fail to run if root, or missing files. X-Git-Tag: 1.5~28 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=37bbdb07326d285b7bd6011da9119a46c09897e5;p=febootstrap.git Fail to run if root, or missing files. --- diff --git a/examples/minimal-filesystem.sh b/examples/minimal-filesystem.sh index 1ef6928..01ca9e8 100755 --- a/examples/minimal-filesystem.sh +++ b/examples/minimal-filesystem.sh @@ -12,6 +12,16 @@ # few command line utilities. One of the joys of Fedora is that even # this minimal install is still 200 MB ... +if [ $(id -u) -eq 0 ]; then + echo "Don't run this script as root. Read instructions in script first." + exit 1 +fi + +if [ ! -e vmlinuz ]; then + echo "Read instructions in script first." + exit 1 +fi + ../febootstrap -i bash -i coreutils fedora-10 ./minimal $1 # ... but let's minimize it aggressively.