From 37bbdb07326d285b7bd6011da9119a46c09897e5 Mon Sep 17 00:00:00 2001 From: rjones Date: Fri, 20 Mar 2009 15:59:55 +0000 Subject: [PATCH] Fail to run if root, or missing files. --- examples/minimal-filesystem.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. -- 1.8.3.1