various fixes, make settable basefile dir
[automated-distro-installer] / myfai-chboot
index 452f8fa579cd3a45de80684a25db60d9b565fb52..cbba8b5b97abe269d5e4b41b138e9b31fd1256aa 100755 (executable)
@@ -6,13 +6,13 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
 
 usage() {
-    cat <<EOF
-usage: ${0##*/} [-h|--help] [hostname|ip]
+  cat <<EOF
+usage: ${0##*/} [-h|--help] [HOSTNAME|IP|default]
 
 Sets up tftp pxe config and nfs server on host "faiserver".
 
-If our kernel has no nfs support, uses apache, and depends on another
-repo of Ian Kelling, basic-https-conf, where the file is at
+If our kernel has no nfs support, uses apache intead of nfs, and depends
+on another repo of Ian Kelling, basic-https-conf, where the file is at
 /a/exe/web-conf.
 
 Usng this, you can boot into fai with pxe-kexec without changing
@@ -27,12 +27,12 @@ to disable the nfs server.
 -h|--help   Print help and exit.
 
 EOF
-    exit $1
+  exit $1
 }
 case $1 in
-    -h|--help) usage ;;
+  -h|--help) usage ;;
 esac
 
 
-host=$(chost faiserver)
+host=$(./chost faiserver)
 ssh root@$host bash -s -- "$@" <myfai-chboot-local