diff options
author | rjones <rjones> | 2009-03-20 15:59:55 +0000 |
---|---|---|
committer | rjones <rjones> | 2009-03-20 15:59:55 +0000 |
commit | 37bbdb07326d285b7bd6011da9119a46c09897e5 (patch) | |
tree | 0e269aa18a881b2cc3d6f326932fb31ed0a81041 | |
parent | dd31db6b8575017d3a4f5bb56c6550e9138a2590 (diff) | |
download | febootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.tar.gz febootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.tar.xz febootstrap-37bbdb07326d285b7bd6011da9119a46c09897e5.zip |
Fail to run if root, or missing files.
-rwxr-xr-x | examples/minimal-filesystem.sh | 10 |
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. |