Merge branch 'upstream'
authorIan Kelling <iank@fsf.org>
Wed, 27 Apr 2022 02:42:29 +0000 (22:42 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 27 Apr 2022 02:42:29 +0000 (22:42 -0400)
1  2 
fai/config/class/FAIBASE.var
fai/config/scripts/LAST/50-misc

index dc507c77faa2b23e133ab46443036ffd11a6bddc,72d38f2006aa34f388621e6880c2ba051aad06b3..dabfb068d5c79cc44cd2656516e961c8453dc51e
@@@ -1,5 -1,3 +1,5 @@@
 +#### from upstream example config, except where noted
 +
  # default values for installation. You can override them in your *.var files
  
  # allow installation of packages from unsigned repositories
@@@ -7,11 -5,21 +7,18 @@@ FAI_ALLOW_UNSIGNED=
  
  # Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
  UTC=yes
 -TIMEZONE=Europe/Berlin
 -
 -# the hash of the root password for the new installed linux system
 -# pw is "fai"
 -ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
 +## changed from upstream. found in /usr/share/zoneinfo/, via fai-guide
 +TIMEZONE=US/Eastern
  
  # errors in tasks greater than this value will cause the installation to stop
  STOP_ON_ERROR=700
  
  # set parameter for install_packages(8)
  MAXPACKAGES=800
 -username=demo
 -USERPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
+ # a user account will be created
++#username=demo
++#USERPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
+ # set a default
+ FAI_DEBOOTSTRAP="bullseye http://deb.debian.org/debian"
index 16e697e5eb1a5da5e41bdd8e8adbb4dd1cd24693,2a7271b777041292a96527f85bab611d92125612..831f15d6f288fdf380d23d30257c6101167fcec7
@@@ -15,15 -15,13 +15,15 @@@ els
      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
 +  # i use dm for crypt, not lvm, so this gives false positive. todo, send patch to remove this
 +  # upstream.
 +  # 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
@@@ -47,7 -45,7 +47,7 @@@ if [ $do_init_tasks -eq 1 ] ; the
  fi
  
  # Make sure everything is configured properly
 -if ifclass DEBIAN ; then
 +if ifclass DEBIAN || ifclass UBUNTU; then
          $ROOTCMD apt-get -f install -y
  fi
  
@@@ -74,7 -72,7 +74,7 @@@ setrel() 
        return
      fi
  
 -    dists="jessie stretch buster bullseye bookworm trixie focal bionic xenial trusty"
 +    dists="jessie stretch buster bullseye bookworm trixie jammy focal bionic xenial trusty aramo nabia etiona"
      for d in $dists; do
        if grep -iq $d $target/etc/os-release; then
            release=$d
@@@ -92,7 -90,7 +92,7 @@@ deb $security_cdn/debian-security ${sec
  #deb [trusted=yes] http://fai-project.org/download $release koeln
  EOF
      # if the package fai-server was installed, enable the project's repository
-     if [ -f $target/var/lib/dpkg/info/fai-server.list ]; then
+     if dpkg-query --admindir=$target/var/lib/dpkg -W fai-server >/dev/null 2>&1; then
        sed -i -e '/fai-project.org/s/^#//' $target/etc/apt/sources.list
      fi
  fi