upstream 00f2ea2b8 as of 2018-09-02
authorIan Kelling <iank@fsf.org>
Sun, 2 Sep 2018 22:23:31 +0000 (18:23 -0400)
committerIan Kelling <iank@fsf.org>
Sun, 2 Sep 2018 22:23:31 +0000 (18:23 -0400)
43 files changed:
fai/config/basefiles/mk-basefile
fai/config/class/41-warning.sh
fai/config/class/55-classes [deleted file]
fai/config/class/DEBIAN.var
fai/config/class/FAIBASE.var
fai/config/class/GCE.var [deleted file]
fai/config/debconf/CLOUD
fai/config/debconf/GCE [deleted file]
fai/config/disk_config/CENTOS
fai/config/disk_config/CLOUD
fai/config/disk_config/FAIBASE
fai/config/disk_config/LVM
fai/config/disk_config/XENIAL
fai/config/files/etc/apt/sources.list/GCE [deleted file]
fai/config/files/etc/apt/sources.list/GNOME
fai/config/files/etc/apt/sources.list/preinst [deleted file]
fai/config/files/etc/fai/apt/sources.list/FAISERVER [deleted file]
fai/config/files/etc/fai/nfsroot.conf/FAISERVER
fai/config/files/etc/init.d/expand-root/GCE [deleted file]
fai/config/files/etc/rc.local/FAISERVER
fai/config/hooks/debconf.IMAGE
fai/config/hooks/mountdisks.DEFAULT [new file with mode: 0755]
fai/config/hooks/savelog.LAST.sh
fai/config/package_config/DEBIAN
fai/config/package_config/DEMO
fai/config/package_config/FAIBASE [deleted file]
fai/config/package_config/FAISERVER
fai/config/package_config/GCE [deleted file]
fai/config/package_config/GCE.asc [deleted file]
fai/config/package_config/GERMAN
fai/config/package_config/STANDARD [new file with mode: 0644]
fai/config/package_config/UBUNTU
fai/config/package_config/XORG
fai/config/scripts/CENTOS/80-misc
fai/config/scripts/DEBIAN/10-rootpw
fai/config/scripts/DEBIAN/30-interface
fai/config/scripts/DEBIAN/40-misc
fai/config/scripts/DEMO/10-misc
fai/config/scripts/FAIBASE/10-misc
fai/config/scripts/FAISERVER/10-conffiles
fai/config/scripts/GCE/10-misc [deleted file]
fai/config/scripts/GRUB_PC/05-gce-grub [deleted file]
fai/config/scripts/LAST/50-misc

index b93831ca3493a506c1040149a1b32e2dfd1b2a29..2fc0d2ace513f27ed08439c51521585a099ff107 100755 (executable)
@@ -2,7 +2,7 @@
 
 # mk-basefile, create basefiles for some distributions
 #
-# Thomas Lange, Uni Koeln, 2011-2017
+# Thomas Lange, Uni Koeln, 2011-2018
 # based on the Makefile implementation of Michael Goetze
 #
 # Usage example: mk-basefile -J STRETCH64
@@ -24,17 +24,19 @@ MIRROR_DEBIAN=http://deb.debian.org/debian/
 MIRROR_UBUNTU=http://mirror.netcologne.de/ubuntu/
 MIRROR_CENTOS=http://mirror.netcologne.de/
 
-EXCLUDE_SQUEEZE=isc-dhcp-client,isc-dhcp-common,info,tasksel,tasksel-data
-EXCLUDE_WHEEZY=info,tasksel,tasksel-data
-EXCLUDE_JESSIE=info,tasksel,tasksel-data
-EXCLUDE_STRETCH=info,tasksel,tasksel-data
-EXCLUDE_BUSTER=tasksel,tasksel-data
+EXCLUDE_SQUEEZE=isc-dhcp-client,isc-dhcp-common,info
+EXCLUDE_WHEEZY=info
+EXCLUDE_JESSIE=info
+EXCLUDE_STRETCH=info
+EXCLUDE_BUSTER=
+EXCLUDE_SID=
 
 EXCLUDE_TRUSTY=dhcp3-client,dhcp3-common,info
-EXCLUDE_XENIAL=udhcpc,dibbler-client,info,tasksel,tasksel-data
+EXCLUDE_XENIAL=udhcpc,dibbler-client,info
+EXCLUDE_BIONIC=udhcpc,dibbler-client,info
 
-# we need aptitude in the base file, since users may want to use it for installing packages
-INCLUDE_DEBIAN=aptitude
+# here you can add packages, that are needed very early
+INCLUDE_DEBIAN=
 
 
 setarch() {
@@ -175,8 +177,12 @@ debgeneric() {
     dist=${dist,,}
 
     check
+    if [ -n "$INCLUDE_DEBIAN" ]; then
+       local inc="--include=$INCLUDE_DEBIAN"
+    fi
+
     if [ -n "$arch" ]; then
-       qemu-debootstrap --arch $arch --exclude=${!exc} --include=${INCLUDE_DEBIAN} $dist $xtmp $mirror
+       qemu-debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror
        target="${target}_${arch^^}"
     else
        if [[ $DIST =~ 64 ]]; then
@@ -184,7 +190,7 @@ debgeneric() {
        else
             arch=i386
        fi
-       debootstrap --arch $arch --exclude=${!exc} --include=${INCLUDE_DEBIAN} $dist $xtmp $mirror
+       debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror
     fi
     cleanup-deb
     tarit
@@ -202,11 +208,13 @@ prtdists() {
                  SLC7_64
     TRUSTY32     TRUSTY64
     XENIAL32     XENIAL64
+                 BIONIC64
     SQUEEZE32    SQUEEZE64
     WHEEZY32     WHEEZY64
     JESSIE32     JESSIE64
     STRETCH32    STRETCH64
     BUSTER32     BUSTER64
+    SID32        SID64
 "
 }
 
@@ -215,12 +223,11 @@ usage() {
     cat <<EOF
 mk-basefile, create minimal base files for a Linux distritubtion
 
-   Copyright (C) 2011-2017 by Thomas Lange
+   Copyright (C) 2011-2018 by Thomas Lange
 
 Usage: mk-basefile [OPTION] ... DISTRIBUTION
 
    -s                   Show list of supported linux distributions
-   -a                   Add xtattrs, acl and selinux properties to the tar file.
    -f ARCH              Build for foreign architecture ARCH.
    -d DIR               Use DIR for creating the temporary subtree structure.
    -z                   Use gzip for compressing the tar file.
@@ -241,10 +248,11 @@ ext=tar
 zip=cat
 attributes=
 cleanup=1
+attributes="--xattrs --selinux --acls"
 
 while getopts ashzJd:kf: opt ; do
     case "$opt" in
-        a) attributes="--xattrs --selinux --acl" ;;
+        a) echo "$0: Warning. -a is ignored, because xtattrs, acls and selinux are always added." ;;
         d) export TMPDIR=$OPTARG ;;
         f) export ARCH=$OPTARG ;;
         z) zip="gzip -9"; ext=tar.gz ;;
@@ -279,9 +287,9 @@ case "$target" in
     SLC6_32) slc i386 6 ;;
     SLC6_64) slc amd64 6 ;;
     SLC7_64) slc amd64 7 ;;
-    TRUSTY*|XENIAL*)
+    TRUSTY*|XENIAL*|BIONIC*)
         debgeneric $target $MIRROR_UBUNTU ;;
-    SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*)
+    SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*|SID*)
         debgeneric $target $MIRROR_DEBIAN $ARCH;;
     *) echo "Unknown distribution. Aborting."
        prtdists
index 4f6e6f26358d219799a07b1e5807d8bf7c76d93d..e9f9ec5b396bffc40147e1fed3ffde799e4dd947 100755 (executable)
@@ -13,6 +13,16 @@ grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
 [ "$flag_menu" ] || return 0
 
 out=$(tty)
+red=$(mktemp)
+echo 'screen_color = (CYAN,RED,ON)' > $red
 
-dialog --colors --clear --aspect 6 --title "FAI - Fully Automatic Installation" --trim \
+DIALOGRC=$red dialog --colors --clear --aspect 6 --title "FAI - Fully Automatic Installation" --trim \
                --msgbox "\n\n        If you continue,       \n   all your data on the disk   \n                               \n|\Zr\Z1       WILL BE DESTROYED     \Z0\Zn|\n\n" 0 0 1>$out
+
+# stop on any error, or if ESC was hit
+if [ $? -ne 0 ]; then
+    task_error 999
+fi
+
+rm $red
+unset red
diff --git a/fai/config/class/55-classes b/fai/config/class/55-classes
deleted file mode 100755 (executable)
index f46bda8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-ifclass GCE && echo AMD64 CLOUD
-exit 0
index 8f00bb917517969e35dcfc9dfdf28a0ea3d5155b..b7146a799f059904b55ccfc44561486e2cf3c304 100644 (file)
@@ -1,3 +1,7 @@
+release=stretch
+apt_cdn=http://deb.debian.org
+security_cdn=http://security.debian.org
+
 CONSOLEFONT=
 KEYMAP=us-latin1
 
@@ -13,5 +17,3 @@ MODULESLIST="usbhid psmouse"
 
 # if you want to use the faiserver as APT proxy
 #APTPROXY=http://faiserver:3142
-
-apt_cdn=http://deb.debian.org
index 789cc7f83d804ff12cb556492cfaffb69f92e193..6f2f25ee8e6e88977d56981194feb117b09f66c9 100644 (file)
@@ -16,3 +16,7 @@ STOP_ON_ERROR=700
 
 # set parameter for install_packges(8)
 MAXPACKAGES=800
+
+# a user account will be created
+username=demo
+USERPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
diff --git a/fai/config/class/GCE.var b/fai/config/class/GCE.var
deleted file mode 100644 (file)
index 805bb3d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-release=stretch
-TIMEZONE=UTC
-NTPSRVS='metadata.google.internal'
-NIC1=eth0
index 4ecbdea258e002e6a3ec1515be72ad069134df7e..a5ab74d3694b5956fd019caf5e677c7e4ad08a56 100644 (file)
@@ -1,2 +1,2 @@
 # Linux command line:
-grub-pc grub2/linux_cmdline_default     string quiet elevator=noop
+grub-pc grub2/linux_cmdline_default     string elevator=noop quiet
diff --git a/fai/config/debconf/GCE b/fai/config/debconf/GCE
deleted file mode 100644 (file)
index 512366f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Linux command line:
-grub-pc grub2/linux_cmdline_default     string  quiet elevator=noop console=ttyS0,38400n8
-# GRUB timeout; for internal use
-grub-pc grub-pc/timeout string 0
index 99bf0b58e8a1c898708f28a808325abb411d3f15..3b5ef361d06313b009f9ee50ce700c241644cf9e 100644 (file)
@@ -10,8 +10,8 @@ disk_config disk1 disklabel:msdos bootable:1 fstabkey:label
 #primary /      350      ext3  rw,noatime,errors=remount-ro createopts="-L ROOT -I 128"
 
 # use following line for CentOS 7
-primary /      4G-10G    ext4  rw,noatime,errors=remount-ro createopts="-L ROOT"
+primary /      4G-50G    ext4  rw,noatime,errors=remount-ro createopts="-L ROOT"
 
-logical swap   200-1000 swap  sw                           createopts="-L SWAP"
-logical /tmp   100-1G   ext4  rw,noatime,nosuid,nodev      createopts="-L TMP -m 0" tuneopts="-c 0 -i 0"
-logical /home  100-50%  ext4  rw,noatime,nosuid,nodev      createopts="-L HOME -m 1" tuneopts="-c 0 -i 0"
+logical swap   200-10 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"
index cd0365255b4311dec549f655bad0c21d72f7b455..0b760012b478909283161ea524a2f82e42f1594c 100644 (file)
@@ -4,4 +4,4 @@
 
 disk_config disk1 disklabel:msdos bootable:1 fstabkey:uuid align-at:1M
 
-primary /      300-      ext4  rw,barrier=0,noatime,errors=remount-ro tuneopts="-c 0 -i 0"
+primary /      300-      ext4  rw,discard,barrier=0,noatime,errors=remount-ro tuneopts="-c 0 -i 0"
index c6d2d3ea71d3dd74e1e37d35f4c7dec823d93879..0c66cbc03ee7a72c7f883716f78827d26c4dd1b1 100644 (file)
@@ -4,7 +4,6 @@
 
 disk_config disk1 disklabel:msdos bootable:1 fstabkey:uuid
 
-primary /      2G-15G   ext4  rw,noatime,errors=remount-ro
-logical swap   200-1G   swap  sw
-logical /tmp   100-1G   ext4  rw,noatime,nosuid,nodev createopts="-L tmp -m 0" tuneopts="-c 0 -i 0"
-logical /home  100-50%  ext4  rw,noatime,nosuid,nodev createopts="-L home -m 1" tuneopts="-c 0 -i 0"
+primary /      2G-50G   ext4  rw,noatime,errors=remount-ro
+logical swap   200-10G  swap  sw
+logical /home  100-     ext4  rw,noatime,nosuid,nodev createopts="-L home -m 1" tuneopts="-c 0 -i 0"
index f1b43fc2840e55a81b8bdb68d14de9a2c545f937..868970abdae595cb3243b0d5ebcf68a827bdac2f 100644 (file)
@@ -10,6 +10,6 @@ primary -       4G-   -       -
 disk_config lvm
 
 vg vg1  disk1.2
-vg1-root     /       3G-15G   ext4    noatime,rw
+vg1-root     /       3G-50G   ext4    noatime,rw
 vg1-swap     swap    200-4G   swap    sw
 vg1-home     /home   600-     ext4    noatime,nosuid,nodev,rw
index 13b51021a09c21d3f31d86dfcacb3279c60b64a3..22ab65cd9a453ed9d19df2d16c3cd39d07f1a47e 100644 (file)
@@ -7,7 +7,6 @@
 
 disk_config disk1 disklabel:msdos bootable:1 fstabkey:uuid
 
-primary /      2G-15G   ext4  rw,noatime,errors=remount-ro createopts="-O ^metadata_csum"
+primary /      2G-50G   ext4  rw,noatime,errors=remount-ro createopts="-O ^metadata_csum"
 logical swap   200-1G   swap  sw
-logical /tmp   100-1G   ext4  rw,noatime,nosuid,nodev createopts="-L tmp -m 0 -O ^metadata_csum" tuneopts="-c 0 -i 0"
-logical /home  100-50%  ext4  rw,noatime,nosuid,nodev createopts="-L home -m 1 -O ^metadata_csum" tuneopts="-c 0 -i 0"
+logical /home  100-     ext4  rw,noatime,nosuid,nodev createopts="-L home -m 1 -O ^metadata_csum" tuneopts="-c 0 -i 0"
diff --git a/fai/config/files/etc/apt/sources.list/GCE b/fai/config/files/etc/apt/sources.list/GCE
deleted file mode 100644 (file)
index ce2f0db..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-deb {apt_cdn}/debian {release} main contrib non-free
-deb {apt_cdn}/debian {release}-backports main
-deb {apt_cdn}/debian-security {release}/updates main contrib non-free
-
-deb http://packages.cloud.google.com/apt cloud-sdk-{release} main
-deb http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-{release} main
-deb http://packages.cloud.google.com/apt google-cloud-compute-{release} main
index 75e9537c1d595c25f86c5ba019256b3122f1570c..f016a99518ec54662412d7515bd76835f576acb2 100644 (file)
@@ -1,2 +1,3 @@
-deb {apt_cdn}/debian stretch main contrib non-free
-deb {apt_cdn}/debian-security stretch/updates main contrib non-free
+deb {%apt_cdn%}/debian {%release%} main
+deb {%security_cdn%}/debian-security {%release%}/updates main
+deb {%apt_cdn%}/debian {%release%}-updates main
diff --git a/fai/config/files/etc/apt/sources.list/preinst b/fai/config/files/etc/apt/sources.list/preinst
deleted file mode 100755 (executable)
index f67d8d9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/bash
-
-# replace {release} in a sources.list template with the value of $release
-# replace {apt_cdn} with the value of $apt_cdn
-
-# $1 is the class name used
-# $2 is the path to the file copied
-
-# check if a variable of the form {varname} was used at all
-grep -q '{' $2 || exit 0
-
-if [ -z "$release" ]; then
-    echo "\$release is undefined. No substitution performed in $2."
-else
-    sed -i -e "s/{release}/$release/g" $2
-fi
-
-if [ -z "$apt_cdn" ]; then
-    echo "\$apt_cdn not defined. not substituting in $2."
-else
-    sed -i -e "s#{apt_cdn}#$apt_cdn#g" $2
-fi
-
diff --git a/fai/config/files/etc/fai/apt/sources.list/FAISERVER b/fai/config/files/etc/fai/apt/sources.list/FAISERVER
deleted file mode 100644 (file)
index 4f9f2c8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-deb http://deb.debian.org/debian stretch main contrib non-free
-deb http://deb.debian.org/debian-security stretch/updates main contrib non-free
-
-# repository that may contain newer fai packages for stretch
-deb [trusted=yes] http://fai-project.org/download stretch koeln
index 13c22fbb72c4f8148c57426c221c0c9ea0951f98..9e192c69ec68bf62d1a4ef8f8dc7ad3b11c55593 100644 (file)
@@ -7,7 +7,7 @@ FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
 NFSROOT=/srv/fai/nfsroot
 TFTPROOT=/srv/tftp/fai
 NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/
-FAI_DEBOOTSTRAP_OPTS="--exclude=info --include=aptitude"
+FAI_DEBOOTSTRAP_OPTS="--exclude=info"
 
 # Configuration space
 FAI_CONFIGDIR=/srv/fai/config
diff --git a/fai/config/files/etc/init.d/expand-root/GCE b/fai/config/files/etc/init.d/expand-root/GCE
deleted file mode 100755 (executable)
index 82480e7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-### BEGIN INIT INFO
-# Provides:       expand-root
-# Required-Start:
-# Required-Stop:
-# Should-Start:
-# Should-Stop:
-# Default-Start:  2 3 4 5
-# Default-Stop:
-# Description:    Expand the filesystem of the mounted root volume/partition to its maximum possible size
-### END INIT INFO
-
-prog=$(basename $0)
-logger="logger -t $prog"
-
-growpart="growpart"
-
-hash $growpart 2> /dev/null || {
-       $logger "$growpart was not found on PATH. Unable to expand size."
-       exit 1
-}
-
-root_device_path="/dev/sda"
-root_index="1"
-
-# Growpart can fail if the partition is already resized.
-$growpart $root_device_path $root_index || {
-       $logger "growpart failed. Unable to expand size."
-}
-
-device_path="${root_device_path}${root_index}"
-filesystem=$(blkid -s TYPE -o value ${device_path})
-
-case $filesystem in
-       xfs)  xfs_growfs / ;;
-       ext2) resize2fs $device_path ;;
-       ext3) resize2fs $device_path ;;
-       ext4) resize2fs $device_path ;;
-       *)    $logger "The filesystem $filesystem was not recognized. Unable to expand size." ;;
-esac
index 4b7b4a2b879baec20bd2c02a630eb834b5bd0a11..8710678a1991c0e1c8dc575e15754dd6b4307d25 100755 (executable)
@@ -79,7 +79,7 @@ EOF
 fai-chboot -o default
 
 # create a template for booting the installation
-fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/srv/fai/config jessie.tmpl
+fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/srv/fai/config stretch.tmpl
 
 # Since we do not know the MAC address, our DHCP cannot provide the hostname.
 # Therefore we do explicitly set the hostname
index 8c2011277b8fcc51709d1eb550d4a89c3b6468ed..c396636b1bd69c0c222304f802b29d09a03225e2 100755 (executable)
@@ -8,7 +8,7 @@
 
 # I use this tar command to create the image of an already running and configured machine
 # tar -cf /tmp/IMAGE.tar --exclude /tmp/\* --exclude /run/\* --exclude /proc/\* --exclude /sys/\* --exclude /dev/\* /
-# add --xattrs --selinux --acl if needed (for CentOS 7)
+# add --xattrs --selinux --acls if needed (for CentOS 7)
 # Then copy this image to /srv/fai/config/basefiles/IMAGE.tar and make sure your client belongs to the class IMAGE
 
 skiptask extrbase debconf repository updatebase instsoft
diff --git a/fai/config/hooks/mountdisks.DEFAULT b/fai/config/hooks/mountdisks.DEFAULT
new file mode 100755 (executable)
index 0000000..95e6a2b
--- /dev/null
@@ -0,0 +1,9 @@
+#! /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
index 0867631790f5fe387c4a0a02f915857a45a86077..e77b9becd77e774c105420ce8b5dc97a70175fb6 100755 (executable)
@@ -52,7 +52,7 @@ ibwebadmin
 kernel-patch-badram
 kolab-webadmin
 kolabadmin
-gstreamer0.10-plugins-really-bad
+gstreamer.\+-plugins-really-bad
 liberrors.so
 liberrors-samba
 gsambad
@@ -80,7 +80,7 @@ deverror.out
 (floppy), sector 0
 mount version older than kernel
 Can't locate module
-Warning only 896MB will be used.
+Warning only .\+MB will be used.
 hostname: Host name lookup failure
 I can't tell the difference.
 warning, not much extra random data, consider using the -rand option
@@ -151,11 +151,14 @@ can't initialize iptables table
 can't initialize ip6tables table
 Authentication warning overridden
 41-warning.sh
+PCCT header not found
 Download is performed unsandboxed as root as file
 update-alternatives: warning: skip creation of
 loop: module verification failed: signature
 Warning: apt-key output should not be parsed
 WARNING: Failed to connect to lvmetad. Falling back to device scanning
+Warning: The home dir /var/lib/usbmux you specified
+diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory
 update-rc.d: warning: start and stop actions are no longer supported"
 
 # add pattern on some conditions
index d8be34dd5a5aa5b64cba25c42979a1e03bac682b..539b71fc5b62be2239afad558263d756b838a278 100644 (file)
@@ -1,10 +1,27 @@
-PACKAGES install
+PACKAGES install-norec
+apt-transport-https # is only needed for stretch
+debconf-utils
+file
+less
+linuxlogo
+rsync
+openssh-client openssh-server
+time
+procinfo
+nullmailer
+eject
+locales
+console-setup kbd
+pciutils usbutils
+unattended-upgrades
+
+PACKAGES install NONFREE
 # you may want these non-free kernel drivers
-#firmware-bnx2 firmware-bnx2x firmware-realtek
-#firmware-linux
+firmware-bnx2 firmware-bnx2x firmware-realtek
+firmware-linux-nonfree
 
 PACKAGES install I386
-linux-image-686-pae initramfs-tools
+linux-image-686-pae
 memtest86+
 
 PACKAGES install CHROOT
@@ -12,16 +29,13 @@ linux-image-686-pae-
 linux-image-amd64-
 
 PACKAGES install AMD64
-linux-image-amd64 initramfs-tools
+linux-image-amd64
 memtest86+
 
 PACKAGES install ARM64
 grub-efi-arm64
 linux-image-arm64
 
-PACKAGES install DHCPC
-isc-dhcp-client
-
 PACKAGES install GRUB_PC
 grub-pc
 
@@ -32,5 +46,4 @@ PACKAGES install LVM
 lvm2
 
 PACKAGES install CLOUD
-locales-all
 unattended-upgrades
index 255e0d4d2cba07ed82510799dfadc7d256f3230d..8f761628c4cbd57a27f047da35dbbee8c7654800 100644 (file)
@@ -1,8 +1,7 @@
 # some packages we need on a demo machine
 
 PACKAGES install-norec
-fortune-mod fortunes
-rstat-client #rstatd
+htop iotop nmon
 
 # only when also class XORG is defined
 PACKAGES install-norec XORG
diff --git a/fai/config/package_config/FAIBASE b/fai/config/package_config/FAIBASE
deleted file mode 100644 (file)
index 5b1f9b8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-PACKAGES install-norec DEBIAN
-apt-transport-https
-fai-client
-debconf-utils
-file
-less
-linuxlogo
-rdate
-rsync
-openssh-client openssh-server
-time
-procinfo
-nullmailer
-eject
-locales
-console-setup kbd
-pciutils usbutils
-unattended-upgrades
index 7343898fd7a867e721456ef4da0a6eb2fae34345..b26cdd921464445de124ae8b01df50e9396cddf5 100644 (file)
@@ -1,7 +1,6 @@
 PACKAGES install-norec
 fai-quickstart
 
-isc-dhcp-client
 debmirror tcpdump
 xorriso grub-pc
 lftp curl
@@ -11,4 +10,4 @@ apt-cacher-ng
 nscd psmisc
 bind9 dnsutils
 iptables-persistent
-emacs24-nox
+emacs25-nox
diff --git a/fai/config/package_config/GCE b/fai/config/package_config/GCE
deleted file mode 100644 (file)
index 14ca617..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-PACKAGES install
-google-cloud-packages-archive-keyring
-cloud-initramfs-growroot
-cloud-utils
-google-cloud-sdk
-google-compute-engine-$release
-google-compute-engine-init-$release
-google-config-$release
-python-crcmod
-screen
-vim
-
-acpi-support-base
-busybox
-ca-certificates
-curl
-ethtool
-gdisk
-kpartx
-isc-dhcp-client
-lsb-release
-ntp
-parted
-python
-openssh-client
-openssh-server
-sudo
-uuid-runtime
diff --git a/fai/config/package_config/GCE.asc b/fai/config/package_config/GCE.asc
deleted file mode 100644 (file)
index 7663ce5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# pub  2048R/A7317B0F 2015-04-03 Google Cloud Packages Automatic Signing Key <gc-team@google.com>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1
-
-mQENBFUd6rIBCAD6mhKRHDn3UrCeLDp7U5IE7AhhrOCPpqGF7mfTemZYHf/5Jdjx
-cOxoSFlK7zwmFr3lVqJ+tJ9L1wd1K6P7RrtaNwCiZyeNPf/Y86AJ5NJwBe0VD0xH
-TXzPNTqRSByVYtdN94NoltXUYFAAPZYQls0x0nUD1hLMlOlC2HdTPrD1PMCnYq/N
-uL/Vk8sWrcUt4DIS+0RDQ8tKKe5PSV0+PnmaJvdF5CKawhh0qGTklS2MXTyKFoqj
-XgYDfY2EodI9ogT/LGr9Lm/+u4OFPvmN9VN6UG+s0DgJjWvpbmuHL/ZIRwMEn/tp
-uneaLTO7h1dCrXC849PiJ8wSkGzBnuJQUbXnABEBAAG0QEdvb2dsZSBDbG91ZCBQ
-YWNrYWdlcyBBdXRvbWF0aWMgU2lnbmluZyBLZXkgPGdjLXRlYW1AZ29vZ2xlLmNv
-bT6JAT4EEwECACgFAlUd6rICGy8FCQWjmoAGCwkIBwMCBhUIAgkKCwQWAgMBAh4B
-AheAAAoJEDdGwginMXsPcLcIAKi2yNhJMbu4zWQ2tM/rJFovazcY28MF2rDWGOnc
-9giHXOH0/BoMBcd8rw0lgjmOosBdM2JT0HWZIxC/Gdt7NSRA0WOlJe04u82/o3OH
-WDgTdm9MS42noSP0mvNzNALBbQnlZHU0kvt3sV1YsnrxljoIuvxKWLLwren/GVsh
-FLPwONjw3f9Fan6GWxJyn/dkX3OSUGaduzcygw51vksBQiUZLCD2Tlxyr9NvkZYT
-qiaWW78L6regvATsLc9L/dQUiSMQZIK6NglmHE+cuSaoK0H4ruNKeTiQUw/EGFaL
-ecay6Qy/s3Hk7K0QLd+gl0hZ1w1VzIeXLo2BRlqnjOYFX4A=
-=HVTm
------END PGP PUBLIC KEY BLOCK-----
index 3f8ba4e792f0619f3c132eb0b6623bea1eeb7012..a9731eb1f936d7262b785f91aa9551e0a1a5f1f6 100644 (file)
@@ -2,4 +2,4 @@ PACKAGES install
 task-german
 
 PACKAGES install GNOME
-iceweasel-l10n-de icedove-l10n-de
+firefox-esr-l10n-de thunderbird-l10n-de
diff --git a/fai/config/package_config/STANDARD b/fai/config/package_config/STANDARD
new file mode 100644 (file)
index 0000000..6760e7d
--- /dev/null
@@ -0,0 +1,31 @@
+PACKAGES install-norec
+
+# the list of standard packages, without any libs and a few packages removed
+apt-listchanges
+bash-completion
+bind9-host
+dbus
+dnsutils
+doc-debian
+file
+gettext-base
+groff-base
+hdparm
+less
+locales
+lsof
+man-db
+manpages
+mime-support
+ncurses-term
+netcat-traditional
+openssh-client
+pciutils
+perl
+python
+python-minimal
+reportbug
+telnet
+traceroute
+ucf
+xz-utils
index afd01e721465ee42aaf20a63a10554c6413adec2..79a6b3cf48a653b4b40695a24b88c491569d380d 100644 (file)
@@ -1,17 +1,14 @@
 PACKAGES install I386
-linux-image-generic initramfs-tools
+linux-image-generic
 memtest86+
 
 PACKAGES install CHROOT
 linux-image-generic-
 
 PACKAGES install AMD64
-linux-image-generic initramfs-tools
+linux-image-generic
 memtest86+
 
-PACKAGES install DHCPC
-isc-dhcp-client
-
 PACKAGES install GRUB_PC
 grub-pc
 
index 0dcc6246774625f6aae61c9e515e49933afc110b..5859084adb887d2c45bd8d9f18ac799efd7f1eb0 100644 (file)
@@ -1,6 +1,6 @@
 PACKAGES install-norec DEBIAN
 xorg xserver-xorg-video-all xserver-xorg-input-all
-ttf-freefont
+fonts-freefont-ttf
 xscreensaver
 xscreensaver-gl
 xterm
index f4ab9ac8e596bdce21f03f34b9bb3580954ab575..75f3c0f8c66264fa0b28081c7feb2030e55ee1bd 100755 (executable)
@@ -2,10 +2,12 @@
 
 error=0 ; trap "error=$((error|1))" ERR
 
-# add a demo user account
-if ! $ROOTCMD getent passwd demo ; then
-    $ROOTCMD adduser -c "fai demo user" demo
-    $ROOTCMD usermod -p "$ROOTPW" demo
+# add a $username user account
+if [ -n "$username" ]; then
+    if ! $ROOTCMD getent passwd $username ; then
+       $ROOTCMD adduser -c "$username user" $username
+       $ROOTCMD usermod -p "$USERPW" $username
+    fi
 fi
 
 # enable graphical login screen, make run level 5 as default
index c1ee0b18f725043592835d9091eef6e53b60c7e5..7a7f6177a30e398311f8b1659f61114487947767 100755 (executable)
@@ -3,6 +3,10 @@
 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
 
 # set root password
-$ROOTCMD usermod -p "$ROOTPW" root
+if [ -n "$ROOTPW" ]; then
+    $ROOTCMD usermod -p "$ROOTPW" root
+else
+    $ROOTCMD usermod -L root
+fi
 
 exit $error
index 924b2363ab7ff6ef4085b1146ee629b1b4902772..c994ce9af7ace079a263bed48d3cae631b536ea9 100755 (executable)
@@ -14,7 +14,7 @@ newnicnames() {
        return
     fi
 
-    [ -z $NIC1 ] && return
+    [ -z "$NIC1" ] && return
 
     fields="ID_NET_NAME_FROM_DATABASE ID_NET_NAME_ONBOARD ID_NET_NAME_SLOT ID_NET_NAME_PATH"
     for field in $fields; do
@@ -29,6 +29,9 @@ newnicnames() {
     fi
 }
 
+if [ -z "$NIC1" ]; then
+    echo "ERROR: \$NIC1 is not defined. Cannot configure /etc/network/interfaces properly."
+fi
 newnicnames
 CIDR=$(ip -o -f inet addr show $NIC1 | awk '{print $4}')
 if ifclass DHCPC && [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]; then
index 78773f35458e6f79ed797d1522600efdece768fb..4376ab4b99d6db91529f0eec132cc2d24ddb4314 100755 (executable)
@@ -41,13 +41,10 @@ ln -fs /proc/mounts $target/etc/mtab
 
 rm -f $target/etc/dpkg/dpkg.cfg.d/fai $target/etc/dpkg/dpkg.cfg.d/unsafe-io
 
-if [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ] ; then
-  [ -f /etc/fai/fai.conf ] && cp /etc/fai/fai.conf $target/etc/fai/fai.conf
+if [ -d /etc/fai ]; then
+    ainsl -a /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC"
+    fcopy -Miv /etc/fai/fai.conf
 fi
-
-ainsl -a /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC"
-
-fcopy -Miv /etc/fai/fai.conf
 fcopy -iv /etc/rc.local
 
 exit $error
index 45f0573865aec1b486ce070bb84288a047ee6325..42f47494164fcbb569472457b139ef586748738f 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/bash
 
-# (c) Thomas Lange, 2001-2013, lange@debian.org
+# (c) Thomas Lange, 2001-2017, lange@debian.org
 
 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
 
@@ -14,11 +14,26 @@ if ifclass UBUNTU; then
      $ROOTCMD addgroup --system sambashare || true
 fi
 
-# add a demo user account
-if ! $ROOTCMD getent passwd demo ; then
-    $ROOTCMD adduser --disabled-login --gecos "fai demo user" demo
-    $ROOTCMD usermod -p "$ROOTPW" demo
-    for g in $groups; do
-       $ROOTCMD adduser demo $g
-    done
+# add additional user account
+if [ -n "$username" ]; then
+    if ! $ROOTCMD getent passwd $username ; then
+       $ROOTCMD adduser --disabled-login --gecos "$username user" $username
+       $ROOTCMD usermod -p "$USERPW" $username
+       userdir=$($ROOTCMD getent passwd "$username" | cut -d: -f6 )
+
+       # disable xfce question about default or empty panel
+       if [ -f $target/etc/xdg/xfce4/panel/default.xml ]; then
+           xfdir=$userdir/.config/xfce4/xfconf/xfce-perchannel-xml
+           if [ ! -d $target/xfdir ]; then
+               $ROOTCMD mkdir -p $xfdir
+               $ROOTCMD cp /etc/xdg/xfce4/panel/default.xml $xfdir/xfce4-panel.xml
+               # group name is the same as user name
+               $ROOTCMD chown -R $username.$username $userdir/.config
+           fi
+       fi
+
+       for g in $groups; do
+           $ROOTCMD adduser $username $g
+       done
+    fi
 fi
index 2df59448f2db1db403237580b54d62e74b96d25e..fbf85c1efeb23e1acce1d1346adc8d64c3369d96 100755 (executable)
@@ -28,6 +28,8 @@ chown -c root:root $target/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"
 chmod -c 1777 ${target}/tmp
 chown -c 0:0  ${target}/tmp
 
index de17f53c407d7345494a4a53064402fa0e0b2752..812003ba3aeee29788f680bdb2fef45f22474556 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/bash
 
-fcopy -Bvr /etc/fai
-fcopy -Bv /etc/fai/apt/sources.list /etc/dhcp/dhcpd.conf
+fcopy -BvrS /etc/fai
+fcopy -BvS /etc/dhcp/dhcpd.conf
 
 if [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ] ; then
 
diff --git a/fai/config/scripts/GCE/10-misc b/fai/config/scripts/GCE/10-misc
deleted file mode 100755 (executable)
index 4088d14..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /bin/bash
-
-error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
-
-# currently missing from bootstrap-vz:
-# init.d/generate-ssh-hostkeys (currently done in rc.local/CLOUD)
-
-ainsl -av /etc/sysctl.d/70-disable-ipv6.conf 'net.ipv6.conf.all.disable_ipv6 = 1'
-ainsl -av /etc/sysctl.d/70-disable-ipv6.conf 'net.ipv6.conf.lo.disable_ipv6 = 0'
-$ROOTCMD shadowconfig on
-sed -i -e 's/^#PasswordAuthentication yes/PasswordAuthentication no/' $target/etc/ssh/sshd_config
-sed -i -e 's/^PermitRootLogin .*/PermitRootLogin no/' $target/etc/ssh/sshd_config
-ainsl $target/etc/ssh/sshd_config 'ClientAliveInterval 420'
-
-rm -f $target/var/lib/apt/lists/*
-rm -f $target/etc/resolv.conf
diff --git a/fai/config/scripts/GRUB_PC/05-gce-grub b/fai/config/scripts/GRUB_PC/05-gce-grub
deleted file mode 100755 (executable)
index 0883c5e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-
-if ifclass GCE; then
-    ainsl /etc/default/grub 'GRUB_TERMINAL="serial"'
-    ainsl /etc/default/grub 'GRUB_SERIAL_COMMAND="serial --speed 38400 --unit=0 --word=0 --parity=no --stop=1"'
-fi
index 8ae015c082ee24a5ded245b23a24958e6e82de39..a85fd141805b07ca101b405602593b75719d823d 100755 (executable)
@@ -58,7 +58,7 @@ if [ $FAI_ACTION = "install" ]; then
 fi
 
 # copy sources.list
-fcopy -iM /etc/apt/sources.list
+fcopy -iSM /etc/apt/sources.list
 
 
 setrel() {
@@ -87,13 +87,17 @@ if [ -f $target/etc/apt/sources.list -a -n "$release" ]; then
     grep -q 'file generated by fai-cd' $target/etc/apt/sources.list && cat <<EOF > $target/etc/apt/sources.list
 deb $apt_cdn/debian $release main contrib non-free
 deb $apt_cdn/debian-security $release/updates main contrib non-free
-deb [trusted=yes] http://fai-project.org/download $release koeln
+#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
+       sed -i -e '/fai-project.org/s/^#//' $target/etc/apt/sources.list
+    fi
 fi
 
 # for ARM architecture, we may need the kernel and initrd to boot or flash the device
 if ifclass ARM64; then
-    cp -pv $target/boot/vmlinuz* $target/boot/initrd* $LOGDIR
+    cp -pv $target/boot/vmlinuz* $target/boot/initrd* $FAI_RUNDIR
 fi
 
 exit $error