Merge branch 'upstream'
authorIan Kelling <iank@fsf.org>
Sat, 7 Oct 2017 23:10:13 +0000 (16:10 -0700)
committerIan Kelling <iank@fsf.org>
Sat, 7 Oct 2017 23:10:13 +0000 (16:10 -0700)
fai/config/basefiles/mk-basefile
fai/config/class/40-parse-profiles.sh
fai/config/class/41-warning.sh
fai/config/class/GCE.var
fai/config/files/etc/fai/apt/sources.list/FAISERVER
fai/config/files/etc/fai/nfsroot.conf/FAISERVER
fai/config/files/etc/rc.local/FAISERVER
fai/config/scripts/LAST/50-misc

index dd21c5395d0b46168a80e06220a9e3ceff45ad52..d9823cf6c366af338d6bd314d77b933885fc9546 100755 (executable)
@@ -2,7 +2,7 @@
 
 # mk-basefile, create basefiles for some distributions
 #
-# Thomas Lange, Uni Koeln, 2011-2016
+# Thomas Lange, Uni Koeln, 2011-2017
 # based on the Makefile implementation of Michael Goetze
 
 # Supported distributions (each i386/amd64):
index 7ed30554210555a43de897c50d3418882c7691a8..2e58bc35506f6523e2e1983da8253fcbc9c3d74c 100755 (executable)
@@ -9,7 +9,7 @@
 if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = Xdirinstall -o X$FAI_ACTION = X ]; then
     :
 else
-    return
+    return 0
 fi
 
 [ "$flag_menu" ] || return 0
index b3da9feb22135ab30d5939f905b9a421a5b75716..4f6e6f26358d219799a07b1e5807d8bf7c76d93d 100755 (executable)
@@ -3,10 +3,10 @@
 if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = X ]; then
     :
 else
-    return
+    return 0
 fi
 if [ X$action = Xdirinstall ]; then
-    return
+    return 0
 fi
 
 grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
index 223f7583767f72709da533cd893ed5d5eae5723c..805bb3db2dfc9d9b9cc36f199a69c1f0480f6c20 100644 (file)
@@ -1,4 +1,4 @@
-release=jessie
+release=stretch
 TIMEZONE=UTC
 NTPSRVS='metadata.google.internal'
 NIC1=eth0
index d5d463dfb5e4a062ce24fff34b52cf1ad7f2dd39..b9be0aaa1a3ba0150c8e1a6ed21b0be51c67b956 100644 (file)
@@ -1,5 +1,5 @@
-deb http://httpredir.debian.org/debian jessie main contrib non-free
-deb http://security.debian.org/debian-security jessie/updates main contrib non-free
+deb http://httpredir.debian.org/debian stretch main contrib non-free
+deb http://security.debian.org/debian-security stretch/updates main contrib non-free
 
-# repository that may contain newer fai packages for jessie
-deb [trusted=yes] http://fai-project.org/download jessie koeln
+# repository that may contain newer fai packages for stretch
+deb [trusted=yes] http://fai-project.org/download stretch koeln
index 4cff8cdf6051adea46338fc5b57700c086ffee24..5d9374958c9d59097287d59cc2815f0c7b5c9d3e 100644 (file)
@@ -1,7 +1,7 @@
 # For a detailed description see nfsroot.conf(5)
 
 # "<suite> <mirror>" for debootstrap
-FAI_DEBOOTSTRAP="jessie http://httpredir.debian.org/debian"
+FAI_DEBOOTSTRAP="stretch http://httpredir.debian.org/debian"
 FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
 
 NFSROOT=/srv/fai/nfsroot
index dffa360eb4d42bcbb0bddb1caabc8e14c735be1d..8bbfd291f4edcaa084d06b65a72a31a3f2908696 100755 (executable)
@@ -10,7 +10,8 @@ GREEN='\E[32m'
 set -o pipefail
 
 # setup network
-ifup eth0
+nic=$(grep iface /etc/network/interfaces| awk '{print $2}'|egrep -v ^lo)
+ifup $nic
 # regenerate ssh_host keys
 ls /etc/ssh/ssh_host_* > /dev/null
 if [ $? -ne 0 ]; then
@@ -19,10 +20,10 @@ fi
 sleep 8
 [ -x /etc/init.d/nscd ] && /etc/init.d/nscd restart
 
-echo "=================================" >/dev/console
-echo "Setting up the FAI install server" >/dev/console
-echo "This will take a few minutes" >/dev/console
-echo "=================================" >/dev/console
+echo "================================="
+echo "Setting up the FAI install server"
+echo "This will take a few minutes"
+echo "================================="
 
 . /etc/fai/fai.conf
 . /etc/fai/nfsroot.conf
@@ -39,30 +40,30 @@ fi
 ainsl /etc/fai/fai.conf "^LOGUSER=fai"
 
 # make index, then import the packages from the CD mirror
-apt-get update
+apt-get update >/dev/null
 curl -fs 'http://127.0.0.1:3142/acng-report.html?doImport=Start+Import&calcSize=cs&asNeeded=an#bottom' >/dev/null
 
 # setup the FAI server, including creating the nfsroot, use my own proxy
 export APTPROXY="http://127.0.0.1:3142"
 if [ -f /var/tmp/base.tar.xz ]; then
-    fai-setup -fvB /var/tmp/base.tar.xz 2>&1
+    fai-setup -fvB /var/tmp/base.tar.xz > /var/log/fai/fai-setup.log 2>&1
 else
-    fai-setup -fv 2>&1
+    fai-setup -fv > /var/log/fai/fai-setup.log 2>&1
 fi
 if [ $? -eq 0 ]; then
     rm /var/tmp/base.tar.xz
     echo ""
-    echo "================================================" >/dev/console
-    echo -e "Setting up the FAI server was ${GREEN}successful${NORMAL}" >/dev/console
-    echo "================================================" >/dev/console
+    echo "================================================"
+    echo -e "Setting up the FAI server was ${GREEN}successful${NORMAL}"
+    echo "================================================"
     echo ""
     sleep 10
 else
     echo ""
-    echo "==================================================" >/dev/console
-    echo -e "${RED}ERROR${NORMAL}: Setting up the FAI install server ${RED}FAILED${NORMAL}!" >/dev/console
-    echo "Read /var/log/fai/fai-setup.log for more debugging" >/dev/console
-    echo "==================================================" >/dev/console
+    echo "=================================================="
+    echo -e "${RED}ERROR${NORMAL}: Setting up the FAI install server ${RED}FAILED${NORMAL}!"
+    echo "Read /var/log/fai/fai-setup.log for more debugging"
+    echo "=================================================="
     echo ""
     sleep 10
     exit 99
index 2a8f2f129a6b47faa295b2f34ed6507595317d2d..4627697ecea58fc7b859c6a6abf2037e39eaaa0f 100755 (executable)
@@ -15,14 +15,13 @@ else
     fi
   fi
 
-  # # commented because it does false possitive
-  # usedm=$(dmsetup ls | egrep -v '^live-rw|^live-base|^No devices found' | wc -l)
-  # if [ $usedm -ne 0 ]; then
-  #   if [ ! -d $target/etc/lvm ]; then
-  #       echo ERROR: Found lvm devices, but the lvm2 package was not installed
-  #       error=1
-  #   fi
-  # fi
+  usedm=$(dmsetup ls 2>/dev/null | egrep -v '^live-rw|^live-base|^No devices found' | wc -l)
+  if [ $usedm -ne 0 ]; then
+    if [ ! -d $target/etc/lvm ]; then
+       echo ERROR: Found lvm devices, but the lvm2 package was not installed
+       error=1
+    fi
+  fi
 fi
 
 # remove backup files from cfengine, but only if cfengine is installed
@@ -71,7 +70,7 @@ setrel() {
        return
     fi
 
-    dists="jessie stretch xenial trusty"
+    dists="jessie stretch buster xenial trusty"
     for d in $dists; do
        if grep -iq $d $target/etc/os-release; then
            release=$d