various fixes, make settable basefile dir
[automated-distro-installer] / faiserver-setup
index 28e71e370dacc61542200f8ceac48c55c7a27797..b9fe68f037cf7c6f5e8821e3d61e0106289de7a3 100755 (executable)
@@ -30,8 +30,7 @@ that using a hostname does not work.
 Separate from running this, faiserver needs to be setup in dns
 to point to whatever host this is run on.
 
 Separate from running this, faiserver needs to be setup in dns
 to point to whatever host this is run on.
 
-For running on arm, it expects Ian's fai-basefiles repository at
-/a/bin/fai-basefiles
+It expects $BASEFILE_DIR/STRETCH64.tar.gz to exist.
 
 EOF
   exit $1
 
 EOF
   exit $1
@@ -186,7 +185,7 @@ fi
 if armhf; then
   cd /srv/fai
   rm -rf nfsroot
 if armhf; then
   cd /srv/fai
   rm -rf nfsroot
-  tar Jxf /a/bin/fai-basefiles/basefiles/STRETCH64.tar.xz
+  tar Jxf $BASEFILE_DIR/STRETCH64.tar.xz
   # background: Can't build the nfsroot on my arm system now.  First,
   # fai-make-nfsroot won't work out of the box. One idea to make it work
   # is by installing qemu-user-static, then copying qemu-x86_64-static
   # background: Can't build the nfsroot on my arm system now.  First,
   # fai-make-nfsroot won't work out of the box. One idea to make it work
   # is by installing qemu-user-static, then copying qemu-x86_64-static
@@ -242,7 +241,7 @@ EOF
 else # not armhf
   # note, this copies the -B arg to
   # /srv/fai/nfsroot/var/tmp/base.tar.xz
 else # not armhf
   # note, this copies the -B arg to
   # /srv/fai/nfsroot/var/tmp/base.tar.xz
-  e fai-setup -evf -B /a/bin/fai-basefiles/basefiles/STRETCH64.tar.gz
+  e fai-setup -evf -B $BASEFILE_DIR/STRETCH64.tar.gz
   # fai-setup expert mode avoids writing to /var/log/fai/variables
   # at least config_src is needed for autodiscover
   $sed '/^FAI_CONFIGDIR|^FAI_CONFIG_SRC|^LOGUSER/d' /var/log/fai/variables
   # fai-setup expert mode avoids writing to /var/log/fai/variables
   # at least config_src is needed for autodiscover
   $sed '/^FAI_CONFIGDIR|^FAI_CONFIG_SRC|^LOGUSER/d' /var/log/fai/variables