# mk-basefile, create basefiles for some distributions
#
-# Thomas Lange, Uni Koeln, 2011-2018
+# Thomas Lange, Uni Koeln, 2011-2020
# based on the Makefile implementation of Michael Goetze
#
# Usage example: mk-basefile -J STRETCH64
# Supported distributions (each i386/amd64):
# Debian GNU/Linux
# Ubuntu 14.04/16.04
-# CentOS 5/6/7
+# CentOS 5/6/7/8
# Scientific Linux Cern 5/6
#
# Packages you might want to install to use this command:
EXCLUDE_JESSIE=info
EXCLUDE_STRETCH=info
EXCLUDE_BUSTER=
+EXCLUDE_BULLSEYE=
EXCLUDE_SID=
EXCLUDE_TRUSTY=dhcp3-client,dhcp3-common,info
EXCLUDE_XENIAL=udhcpc,dibbler-client,info
EXCLUDE_BIONIC=udhcpc,dibbler-client,info
+EXCLUDE_FOCAL=udhcpc,dibbler-client,info
# here you can add packages, that are needed very early
INCLUDE_DEBIAN=
check() {
- if [ `id -u` != 0 ]; then
+ if [ $(id -u) != 0 ]; then
echo "You must be root to create chroots."
exit 1
fi
tarit() {
- tar $attributes --one-file-system -C $xtmp -cf - . | $zip > $target.$ext
+ tar $attributes --numeric-owner --one-file-system -C $xtmp -cf - . | $zip > $target.$ext
}
CENTOS5_32 CENTOS5_64
CENTOS6_32 CENTOS6_64
CENTOS7_32 CENTOS7_64
+ CENTOS8_64
SLC5_32 SLC5_64
SLC6_32 SLC6_64
SLC7_64
TRUSTY32 TRUSTY64
XENIAL32 XENIAL64
BIONIC64
+ FOCAL64
SQUEEZE32 SQUEEZE64
WHEEZY32 WHEEZY64
JESSIE32 JESSIE64
STRETCH32 STRETCH64
BUSTER32 BUSTER64
+ BULLSEYE32 BULLSEYE64
SID32 SID64
"
}
cat <<EOF
mk-basefile, create minimal base files for a Linux distritubtion
- Copyright (C) 2011-2018 by Thomas Lange
+ Copyright (C) 2011-2020 by Thomas Lange
Usage: mk-basefile [OPTION] ... DISTRIBUTION
?) exit 3 ;; # error in option parsing
esac
done
-shift $(($OPTIND - 1))
+shift $((OPTIND - 1))
xtmp=$(mktemp --tmpdir -d basefiles.XXXXXXXX)
if [ $? -eq 1 ]; then
CENTOS6_64) centos amd64 6 ;;
CENTOS7_32) centos i386 7 ;;
CENTOS7_64) centos amd64 7 ;;
+ CENTOS8_64) centos amd64 8 ;;
SLC5_32) slc i386 5 ;;
SLC5_64) slc amd64 5 ;;
SLC6_32) slc i386 6 ;;
SLC6_64) slc amd64 6 ;;
SLC7_64) slc amd64 7 ;;
- TRUSTY*|XENIAL*|BIONIC*)
+ TRUSTY*|XENIAL*|BIONIC*|FOCAL*)
debgeneric $target $MIRROR_UBUNTU ;;
- SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*|SID*)
+ SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*|BULLSEYE*|SID*)
debgeneric $target $MIRROR_DEBIAN $ARCH;;
*) echo "Unknown distribution. Aborting."
prtdists
[ "$flag_menu" ] || return 0
out=$(tty)
-tempfile=`(tempfile) 2>/dev/null`
-tempfile2=`(tempfile) 2>/dev/null`
+tempfile=$(mktemp)
+tempfile2=$(mktemp)
trap "rm -f $tempfile $tempfile2" EXIT INT QUIT
# declare the data structure, use associative arrays
echo "FAIBASE DEBIAN DEMO XORG XFCE LVM";;
gnomehost)
echo "FAIBASE DEBIAN DEMO XORG GNOME";;
+ ubuntuhost)
+ echo "FAIBASE DEBIAN DEMO UBUNTU FOCAL FOCAL64 XORG";;
centos)
echo "FAIBASE CENTOS" # you may want to add class XORG here
- ifclass I386 && echo CENTOS6_32 # AFAIK there's no 32bit C7
- ifclass AMD64 && echo CENTOS7_64
+ ifclass AMD64 && echo CENTOS8_64
;;
slchost)
# Scientific Linux Cern, is very similar to CentOS. SLC should alsways use the class CENTOS
--- /dev/null
+#! /bin/bash
+
+# define classes for disk_config in an EFI enironment
+
+if [ ! -d /sys/firmware/efi ]; then
+ exit 0
+fi
+
+if ifclass FAIBASE; then
+ echo FAIBASE_EFI
+elif ifclass FAISERVER; then
+ echo FAISERVER_EFI
+elif ifclass LVM; then
+ echo LVM_EFI
+elif ifclass XENIAL; then
+ echo XENIAL_EFI
+fi
ubuntumirror=http://archive.ubuntu.com
-ubuntudist=bionic
+ubuntudist=focal
downloaded from the internet.
Classes: INSTALL FAIBASE DEBIAN DEMO XORG GNOME
-Name: CentOS 7
-Description: CentOS 7 with Xfce desktop
-Short: A normal Xfce desktop, running CentOS 7
-Long: We use the Debian nfsroot for installing the CentOS 7 OS.
+Name: CentOS 8
+Description: CentOS 8 with Xfce desktop
+Short: A normal Xfce desktop, running CentOS 8
+Long: We use the Debian nfsroot for installing the CentOS 8 OS.
You should have a fast network connection, because most packages are
downloaded from the internet.
-Classes: INSTALL FAIBASE CENTOS CENTOS7_64 XORG
+Classes: INSTALL FAIBASE CENTOS CENTOS8_64 XORG
Name: Ubuntu
-Description: Ubuntu 18.04 desktop installation
+Description: Ubuntu 20.04 desktop installation
Short: Unity desktop
Long: We use the Debian nfsroot for installing the Ubuntu OS.
You should have a fast network connection, because most packages are
downloaded from the internet.
-Classes: INSTALL FAIBASE DEMO DEBIAN UBUNTU BIONIC BIONIC64 XORG
+Classes: INSTALL FAIBASE DEMO DEBIAN UBUNTU FOCAL FOCAL64 XORG
Name: Inventory
Description: Show hardware info
primary / 4G-50G ext4 rw,noatime,errors=remount-ro createopts="-L ROOT"
logical swap 200-10G swap sw createopts="-L SWAP"
-logical /tmp 100-5G ext4 rw,noatime,nosuid,nodev createopts="-L TMP -m 0" tuneopts="-c 0 -i 0"
logical /home 100- ext4 rw,noatime,nosuid,nodev createopts="-L HOME -m 1" tuneopts="-c 0 -i 0"
--- /dev/null
+# example of new config file for setup-storage
+#
+# <type> <mountpoint> <size> <fs type> <mount options> <misc options>
+
+disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid
+
+primary /boot/efi 512M vfat rw
+primary / 2G-50G ext4 rw,noatime,errors=remount-ro
+primary swap 200-10G swap sw
+primary /home 100- ext4 rw,noatime,nosuid,nodev createopts="-L home -m 1" tuneopts="-c 0 -i 0"
--- /dev/null
+# config file for an FAI install server
+#
+# <type> <mountpoint> <size> <fs type> <mount options> <misc options>
+
+disk_config disk1 disklabel:gpt fstabkey:uuid
+
+primary /boot/efi 512M vfat rw
+primary / 2G-15G ext4 rw,noatime,errors=remount-ro
+primary swap 200-1000 swap sw
+primary /tmp 100-1000 ext4 rw,noatime,nosuid,nodev createopts="-m 0" tuneopts="-c 0 -i 0"
+primary /home 100-40% ext4 rw,noatime,nosuid,nodev createopts="-m 1" tuneopts="-c 0 -i 0"
+primary /srv 1G-50% ext4 rw,noatime createopts="-m 1" tuneopts="-c 0 -i 0"
--- /dev/null
+# <type> <mountpoint> <size> <fs type> <mount options> <misc options>
+
+# entire disk with LVM, separate /home
+
+disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M
+
+primary /boot/efi 512M vfat rw
+primary /boot 200 ext2 rw,noatime
+primary - 4G- - -
+
+disk_config lvm
+
+vg vg1 disk1.3
+vg1-root / 3G-50G ext4 noatime,rw
+vg1-swap swap 200-4G swap sw
+vg1-home /home 600- ext4 noatime,nosuid,nodev,rw
--- /dev/null
+# example of new config file for setup-storage
+#
+# <type> <mountpoint> <size> <fs type> <mount options> <misc options>
+
+# this is a copy of FAIBASE, but with metadata_csum disabled.
+# Ubuntu XENIAL does not yet suport this option
+
+disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid
+
+primary /boot/efi 512M vfat rw
+primary / 2G-50G ext4 rw,noatime,errors=remount-ro createopts="-O ^metadata_csum"
+primary swap 200-1G swap sw
+primary /home 100- ext4 rw,noatime,nosuid,nodev createopts="-L home -m 1 -O ^metadata_csum" tuneopts="-c 0 -i 0"
set -o pipefail
# setup network
-nic=$(awk '/iface/ {print $2}' /etc/network/interfaces |egrep -v ^lo)
-ifup $nic
+nic=$(cat /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null | awk '$1 == "iface" && $2 != "lo" {print $2; exit}')
+if [ -n "$nic" ]; then
+ ifup $nic
+fi
# regenerate ssh_host keys
ls /etc/ssh/ssh_host_* > /dev/null
if [ $? -ne 0 ]; then
+++ /dev/null
-#! /bin/bash
-
-# stop resync of soft raid
-if [ $do_init_tasks -eq 1 ]; then
- if grep -q active /proc/mdstat 2>/dev/null; then
- echo "frozen" | tee /sys/block/md*/md/sync_action >/dev/null
- fi
-fi
-exit 0
zope-ploneerrorreporting
libroxen-errormessage
liberror-perl
+perl-Error
libgpg-error-dev
libgpg-error0
Opts:.\+errors=remount
Memory Error Correction:
Memory Controller 0 - Channel . Error
IIO RAS/Control Status/Global Errors
+RAS: Correctable Errors collector initialized
__stack_chk_fail
grub.cfg.new: Directory nonexistent
can't derive routing for PCI INT A
stunnel4 you specified can't be accessed: No such file or directory
install-docs --verbose --check file_name' may give more details about the above errors
cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
+can't claim BAR
+disabling ASPM
+data block query control method not found
+subprocess.py.\+RuntimeWarning: line buffering
+Resource conflict.\+ found
update-rc.d: warning: start and stop actions are no longer supported"
# add pattern on some conditions
$ROOTCMD yum -y update >> $LOGDIR/software.log
fi
+$ROOTCMD systemd-machine-id-setup
+
+cat > $target/etc/sysconfig/kernel <<EOF
+# UPDATEDEFAULT specifies if new-kernel-pkg should make
+# new kernels the default
+UPDATEDEFAULT=yes
+
+# DEFAULTKERNEL specifies the default kernel package type
+DEFAULTKERNEL=kernel-core
+EOF
+
skiptask updatebase
deb $ubuntumirror/ubuntu $ubuntudist-updates main restricted universe multiverse
deb $ubuntumirror/ubuntu $ubuntudist-security main restricted universe multiverse
EOM
+
+
+# https://lists.uni-koeln.de/pipermail/linux-fai/2016-July/011398.html
+# In Ubuntu 16.04 (but not 14.04), the locales configuration mechanism has
+# changed. There is a /var/lib/dpkg/info/locales.config file, which
+# overrides /var/lib/dpkg/info/locales.postinst and consults
+# /var/lib/locales/supported.d/local instead of the debconf system. (See
+# the code in /usr/share/debconf/frontend that prefers locales.config.) This
+# hook applies the debconf setting. It must run after FAI's debconf task
+# but before dpkg gets a chance to clobber debconf with an empty setting.
+
+if [ ! -f "$target/var/lib/locales/supported.d/local" ]; then
+ $ROOTCMD debconf --owner=locales sh -c '
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+ db_get locales/locales_to_be_generated &&
+ mkdir -p /var/lib/locales/supported.d &&
+ echo "$RET" > /var/lib/locales/supported.d/local' &&
+ $ROOTCMD dpkg-reconfigure locales
+fi
-PACKAGES yumgroup
+PACKAGES dnfgroup
core
+minimal-environment
+#server-product-environment
+#headless-management
-PACKAGES yumgroup XORG
-#gnome-desktop base-x # slc5/CentOS 5
-#basic-desktop x11 fonts #slc6/CentOS 6
-gnome-desktop # CentOS 7
+PACKAGES dnfgroup XORG
+graphical-server-environment
+workstation-product-environment
-PACKAGES yumi
-authconfig
+PACKAGES dnfi
+NetworkManager
+chrony
kernel
-# sysvinit-tools grub # CentOS 5 and 6
-grub2 # CentOS 7
+dracut
+grub2-pc
+# CentOS 7
less
openssh
openssh-clients
vim-enhanced
man
curl
-screen
unzip
which
-nfs-utils
-pakchois
-ncurses-base # currently missing in the base file
+ncurses ncurses-base
-#sendmail # only for C5 and C6
-
-PACKAGES yumi LVM
+PACKAGES dnfi LVM
lvm2
#! /bin/bash
# (c) Michael Goetze, 2010-11, mgoetze@mgoetze.net
-# Thomas Lange, 2015
+# Thomas Lange, 2015-2020
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
-$ROOTCMD authconfig --enableshadow --enablemd5 \
- --enablelocauthorize --updateall
$ROOTCMD usermod -p $ROOTPW root
fcopy -v /etc/selinux/config
ainsl -v /etc/fstab "proc /proc proc defaults 0 0"
ainsl -v /etc/fstab "sysfs /sys sysfs auto 0 0"
-version=`$ROOTCMD rpm -qv kernel | cut -d- -f2-`
+version=$($ROOTCMD rpm -qv kernel | cut -d- -f2-)
-use_mkinitrd() {
-
- # CentOS 5 uses mkinitrd
- $ROOTCMD kudzu -q -k $version
- # Unfortunately mkinitrd is horrible at guessing which modules to include,
- # especially when the running kernel is different than the kernel for which
- # we are creating an initrd...
-
- drivers=""
- for bus in pci virtio; do
- for dr in `$ROOTCMD kudzu -p -k $version -b $bus|grep driver:|cut -d' ' -f2|sort -u`; do
- found=`find $target/lib/modules/$version/ -name $dr.ko 2>/dev/null`
- if [ -n "$found" ]; then
- # add driver only if it's available as .ko module in the destination kernel
- drivers+=" --with=$dr"
- fi
- done
- done
-
- $ROOTCMD mkinitrd -f -v $drivers /boot/initrd-$version.img $version
-
- if [ $? -eq 1 ]; then
- echo "WARNING: generating initrd with list of drivers failed. Trying without."
- $ROOTCMD mkinitrd -f -v /boot/initrd-$version.img $version
- fi
-}
-
-# CentOS 5 uses mkinitrd
-if [ -f $target/sbin/mkinitrd ]; then
- use_mkinitrd
-fi
if [ -f $target/etc/lvm/lvm.conf ]; then
sed -i -e 's/use_lvmetad = 1/use_lvmetad = 0/' $target/etc/lvm/lvm.conf
ainsl -av /etc/dracut.conf.d/fai.conf 'add_dracutmodules+=" lvm "'
fi
-# call dracut for CentOS 7
-if [ -f $target/usr/sbin/dracut ]; then
- # add filesystem driver into initrd
- ainsl -av /etc/dracut.conf.d/fai.conf 'filesystems+="ext4"'
- $ROOTCMD dracut -v --kver $version --force
-fi
-# call dracut for CentOS 6
-if [ -f $target/sbin/dracut ]; then
- # add filesystem driver into initrd
- ainsl -av /etc/dracut.conf.d/fai.conf 'filesystems+="ext4"'
- $ROOTCMD dracut -v $version
-fi
+# add filesystem driver into initrd
+ainsl -av /etc/dracut.conf.d/fai.conf 'filesystems+="ext4"'
+$ROOTCMD dracut -v --kver $version --force
+
exit $error
done
fi
-bootdev=`device2grub $BOOT_DEVICE`
-bootpart=`device2grub $BOOT_PARTITION`
-version=`$ROOTCMD rpm -qv kernel | cut -d- -f2-`
+bootdev=$(device2grub $BOOT_DEVICE)
+bootpart=$(device2grub $BOOT_PARTITION)
+version=$($ROOTCMD rpm -qv kernel | cut -d- -f2-)
if grep '[[:space:]]/boot[[:space:]]' $LOGDIR/fstab; then
bootdir=''
# CentOS 5
iname=initrd
fi
-title=`head -1 $target/etc/redhat-release`
+title=$(head -1 $target/etc/redhat-release)
cat > $target/boot/grub/grub.conf <<-EOF
timeout 5
#! /bin/bash
-# (c) Michael Goetze, 2011, mgoetze@mgoetze.net
-
error=0 ; trap "error=$((error|1))" ERR
-# Note: Kudzu will automatically configure eth0 for DHCP
-if [ $FAI_ACTION != "softupdate" ] && ! ifclass DHCPC
-then
- ainsl -v /etc/sysconfig/network "^GATEWAY=$GATEWAYS_1\$"
- [ -n "$IPADDR" ] && cat > $target/etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF
+
+# determine predictable network names
+fields="ID_NET_NAME_FROM_DATABASE ID_NET_NAME_ONBOARD ID_NET_NAME_SLOT ID_NET_NAME_PATH"
+for field in $fields; do
+ name=$(udevadm info /sys/class/net/$NIC1 | sed -rn "s/^E: $field=(.+)/\1/p")
+ if [[ $name ]]; then
+ NIC1=$name
+ break
+ fi
+done
+if [[ ! $name ]]; then
+ echo "$0: error: could not find systemd predictable network name. Using $NIC1."
+fi
+
+
+if [ $FAI_ACTION != "softupdate" ] && ifclass DHCPC; then
+ cat > $target/etc/sysconfig/network-scripts/ifcfg-$NIC1 <<-EOF
# generated by FAI
- DEVICE=eth0
- BOOTPROTO=static
+ TYPE=Ethernet
+ PROXY_METHOD=none
+ BOOTPROTO=dhcp
+ DEFROUTE=yes
+ BROWSER_ONLY=no
+ IP4_FAILURE_FATAL=no
+ IPV6INIT=no
+ IPV6_AUTOCONF=no
+ NAME=$NIC1
+ DEVICE=$NIC1
ONBOOT=yes
- HWADDR=`ip l sh dev eth0 | tail -1 | cut -d" " -f6`
- IPADDR=$IPADDR
- NETMASK=$NETMASK
EOF
- # Kudzu for some reason won't write eth0 into /etc/sysconfig/hwconf
- # from within the chroot. The following hack puts it in there
- # so that Kudzu doesn't overwrite our config on first boot.
- if [ -f $target/sbin/kudzu ]; then
- grep eth0 $target/etc/sysconfig/hwconf || $ROOTCMD kudzu -c NETWORK -p \
- >> $target/etc/sysconfig/hwconf
- fi
fi
fcopy -iv /etc/sysconfig/network /etc/resolv.conf /etc/networks
newnicnames() {
# determine predictable network names only for stretch and above
+ local name
[ $do_init_tasks -eq 0 ] && return
[ -z "$NIC1" ] && return
name=$(udevadm info /sys/class/net/$NIC1 | sed -rn "s/^E: $field=(.+)/\1/p")
if [[ $name ]]; then
NIC1=$name
- break
+ return
fi
done
- if [[ ! $name ]]; then
+
+ # try to get altname net dev
+ name=$(ip link show $NIC1 | awk '/altname / { print $2 }')
+ if [[ $name ]]; then
+ NIC1=$name
+ return
+ else
echo "$0: error: could not find systemd predictable network name. Using $NIC1."
fi
}
> $target/etc/machine-id
fi
# recreate machine-id if the file is empty
-if [ X"$(stat -c '%s' $target/etc/machine-id 2>/dev/null)" = X0 -a -f /bin/systemd-machine-id-setup ]; then
+if [ X"$(stat -c '%s' $target/etc/machine-id 2>/dev/null)" = X0 -a -f $target/bin/systemd-machine-id-setup ]; then
$ROOTCMD systemd-machine-id-setup
fi
cp -f /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
fi
+if [ -f $target/etc/hosts.orig ]; then
+ mv $target/etc/hosts.orig $target/etc/hosts
+fi
if [ -n "$IPADDR" ]; then
ifclass DHCPC || ainsl -s /etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
else
ifclass DHCPC && ainsl -s /etc/hosts "127.0.0.1 $HOSTNAME"
fi
-
-if [ -f $target/etc/hosts.orig ]; then
- mv $target/etc/hosts.orig $target/etc/hosts
-fi
fcopy -iM /etc/hosts /etc/motd
# make /root accessible only by root
# copy default dotfiles for root account
fcopy -ir /root
-# use tmpfs for /tmp
-ainsl /etc/fstab "tmpfs /tmp tmpfs nodev,nosuid,size=50%,mode=1777 0 0"
+# use tmpfs for /tmp if not defined in disk_config
+if ! grep -Pq '\s/tmp\s' $target/etc/fstab; then
+ ainsl /etc/fstab "tmpfs /tmp tmpfs nodev,nosuid,size=50%,mode=1777 0 0"
+fi
chmod -c 1777 ${target}/tmp
chown -c 0:0 ${target}/tmp
# (c) Thomas Lange, 2006,2009, lange@debian.org
# create entries for removable media in fstab and directories in /media
-[ -b $target/dev/fd0 ] && ainsl /etc/fstab "/dev/fd0 /media/floppy auto users,noauto 0 0"
-
cdromlist() {
[ -f /proc/sys/dev/cdrom/info ] || return
devs=$(grep 'drive name:' /proc/sys/dev/cdrom/info | cut -d ":" -f 2)
[ $i -eq 0 ] && ln -sfn cdrom0 $target/media/cdrom
mkdir -p $target/media/cdrom$i
fstabline /dev/$cdrom /media/cdrom$i udf,iso9660 ro,user,noauto 0 0
- i=$(($i + 1))
+ i=$((i + 1))
done
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
raiddev=${BOOT_DEVICE#/dev/}
# install grub on all members of RAID
- for device in `LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat`; do
+ for device in $(LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat); do
echo Install grub on /dev/$device
$ROOTCMD grub-install --no-floppy --force-extra-removable "/dev/$device"
done
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
raiddev=${BOOT_DEVICE#/dev/}
# install grub on all members of RAID
- for device in `LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat`; do
+ for device in $(LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; s/(nvme.+?)p/$1/g; print }' /proc/mdstat); do
echo Install grub on /dev/$device
$ROOTCMD grub-install --no-floppy "/dev/$device"
done
# Make sure everything is configured properly
if ifclass DEBIAN ; then
- $ROOTCMD apt-get -f install
+ $ROOTCMD apt-get -f install -y
fi
if [ $FAI_ACTION = "install" ]; then
return
fi
- dists="jessie stretch buster bullseye bookworm bionic xenial trusty"
+ dists="jessie stretch buster bullseye bookworm focal bionic xenial trusty"
for d in $dists; do
if grep -iq $d $target/etc/os-release; then
release=$d
#! /bin/bash
-if ifclass GERMAN; then
- $ROOTCMD locale-gen LANG=de_DE.UTF-8
- $ROOTCMD update-locale LANG=de_DE.UTF-8
-else
- ainsl -v /etc/locale.gen '^en_US.UTF-8 UTF-8'
- $ROOTCMD locale-gen
- $ROOTCMD update-locale LANG=en_US.UTF-8
-fi
-
# check if we already use an external mirror
grep -q "external mirror" $target/etc/apt/sources.list && exit 0