summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrjones <rjones>2009-03-20 15:59:55 +0000
committerrjones <rjones>2009-03-20 15:59:55 +0000
commit37bbdb07326d285b7bd6011da9119a46c09897e5 (patch)
tree0e269aa18a881b2cc3d6f326932fb31ed0a81041
parentdd31db6b8575017d3a4f5bb56c6550e9138a2590 (diff)
downloadfebootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.tar.gz
febootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.tar.xz
febootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.zip
Fail to run if root, or missing files.
-rwxr-xr-xexamples/minimal-filesystem.sh10
1 files changed, 10 insertions, 0 deletions
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.