[Fai-commit] r4143 - trunk/bin
Thomas Lange
lange at alioth.debian.org
Sun Nov 5 12:37:43 CET 2006
Author: lange
Date: 2006-11-05 12:37:43 +0100 (Sun, 05 Nov 2006)
New Revision: 4143
Modified:
trunk/bin/make-fai-nfsroot
Log:
no code change, reorder code so a normal user gets help whem using -h,--help
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2006-11-04 21:47:41 UTC (rev 4142)
+++ trunk/bin/make-fai-nfsroot 2006-11-05 11:37:43 UTC (rev 4143)
@@ -28,6 +28,19 @@
#*********************************************************************
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+usage() {
+
+ cat <<-EOF
+ Copyright (C) 1999-2006 Thomas Lange
+ Report bugs to <fai at informatik.uni-koeln.de>.
+
+ Usage: make-fai-nfsroot [OPTIONS]
+ Create an NFSROOT for FAI.
+ Read the man pages pages make-fai-nfsroot(8).
+EOF
+ exit 0
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
die() {
echo "ERROR: $@"
@@ -37,11 +50,6 @@
PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
-if [ $(id -u) != "0" ]; then
- echo "Run this program as root."
- exit 9
-fi
-
kfile="vmlinuz" # some architectures use different names
kernelname="$kfile-install"
merror="properly"
@@ -61,6 +69,11 @@
esac
done
+if [ $(id -u) != "0" ]; then
+ echo "Run this program as root."
+ exit 9
+fi
+
set -e
# use FAI_ETC_DIR from environment variable
@@ -418,19 +431,6 @@
echo "No kernel modules available in nfsroot."
fi
}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-usage() {
-
- cat <<-EOF
- Copyright (C) 1999-2006 Thomas Lange
- Report bugs to <fai at informatik.uni-koeln.de>.
-
- Usage: make-fai-nfsroot [OPTIONS]
- Create an NFSROOT for FAI.
- Read the man pages pages make-fai-nfsroot(8).
-EOF
- exit 0
-}
# - - - - - - - - - - - - - - - - - - - - - - - - - -
# main routine
More information about the Fai-commit
mailing list