Initial commit

This commit is contained in:
Jan Schär 2022-07-15 11:59:26 +02:00
commit 295a111cec
89 changed files with 2897 additions and 0 deletions

21
config/class/10-base-classes Executable file
View file

@ -0,0 +1,21 @@
#! /bin/bash
# do only execute if this is called on the client being installed. Do not use during fai-diskimage
if [ X$FAI_ACTION = Xinstall -a $do_init_tasks -eq 0 ]; then
exit 0
fi
# Echo architecture and OS name in uppercase. Do NOT remove these two lines.
uname -s | tr '[:lower:]' '[:upper:]'
command -v dpkg >&/dev/null && dpkg --print-architecture | tr a-z A-Z
# determin if we are a DHCP client or not
# count the : chars in the argument of ip=
n="${ip//[^:]}"
if [[ $ip =~ ^(on|any|dhcp)$ ]]; then
echo DHCPC
elif [ ${#n} -lt 6 ]; then
echo DHCPC
fi
exit 0

36
config/class/20-hwdetect.sh Executable file
View file

@ -0,0 +1,36 @@
#! /bin/bash
# (c) Thomas Lange, 2002-2013, lange@informatik.uni-koeln.de
# NOTE: Files named *.sh will be evaluated, but their output ignored.
[ $do_init_tasks -eq 1 ] || return 0 # Do only execute when doing install
echo 0 > /proc/sys/kernel/printk
#kernelmodules=
# here, you can load modules depending on the kernel version
case $(uname -r) in
2.6*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
[3456]*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
esac
for mod in $kernelmodules; do
[ X$verbose = X1 ] && echo Loading kernel module $mod
modprobe -a $mod 1>/dev/null 2>&1
done
# show the basic information about the network interface
ip -br li show up|egrep -v ^lo; ip -br a show up|egrep -v ^lo
echo $printk > /proc/sys/kernel/printk
odisklist=$disklist
set_disk_info # recalculate list of available disks
if [ "$disklist" != "$odisklist" ]; then
echo New disklist: $disklist
echo disklist=\"$disklist\" >> $LOGDIR/additional.var
fi
save_dmesg # save new boot messages (from loading modules)

32
config/class/41-warning.sh Executable file
View file

@ -0,0 +1,32 @@
#! /bin/bash
if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = X ]; then
:
else
return 0
fi
if [ X$action = Xdirinstall ]; then
return 0
fi
grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
[ "$flag_menu" ] || return 0
out=$(tty)
red=$(mktemp)
echo 'screen_color = (CYAN,RED,ON)' > $red
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
# MENU DISABLED
unset flag_menu
FAI_ACTION=install

8
config/class/50-host-classes Executable file
View file

@ -0,0 +1,8 @@
#! /bin/bash
# assign classes to hosts based on their hostname
# do not use this if a menu will be presented
[ "$flag_menu" ] && exit 0
echo "FAIBASE DEBIAN XORG GNOME PARTICIPANT CONTESTANT"

10
config/class/55-classes Executable file
View file

@ -0,0 +1,10 @@
#! /bin/bash
[ "$cmdlineclasses" ] || exit 0
# define the classes given on the cmdline (using -c)
# Note: In the FAI example config, this script has very low priority, but for
# me it make more sense to make it higher priority than the host classes.
echo $cmdlineclasses
exit 0

11
config/class/60-misc Executable file
View file

@ -0,0 +1,11 @@
#! /bin/bash
ifclass -o CENTOS SLC && exit 0
ifclass -o GRUB_PC GRUB_EFI && exit 0
if [ -d /sys/firmware/efi ]; then
echo GRUB_EFI
elif ifclass -o I386 AMD64 ; then
echo GRUB_PC
fi

14
config/class/85-efi-classes Executable file
View file

@ -0,0 +1,14 @@
#! /bin/bash
# define classes for disk_config in an EFI enironment
if [ ! -d /sys/firmware/efi ] || ifclass GRUB_PC; then
exit 0
fi
for c in LVM FAIBASE; do
if ifclass $c; then
echo ${c}_EFI
break
fi
done

View file

@ -0,0 +1 @@
PARTICIPANT_USER_NAME=contestant

26
config/class/DEBIAN.var Normal file
View file

@ -0,0 +1,26 @@
release=bullseye
apt_cdn=http://deb.debian.org
security_cdn=http://security.debian.org
# since bullseye Debian changed the suite name for security
if [ $release = buster ]; then
secsuite=buster/updates
else
secsuite=$release-security
fi
CONSOLEFONT=
KEYMAP=us-latin1
# MODULESLIST contains modules that will be loaded by the new system,
# not during installation these modules will be written to /etc/modules
# If you need a module during installation, add it to $kernelmodules
# in 20-hwdetect.sh.
MODULESLIST="usbhid psmouse"
# if you have enough RAM (>2GB) you may want to enable this line. It
# also puts /var/cache into a ramdisk.
#FAI_RAMDISKS="$target/var/lib/dpkg $target/var/cache"
# if you want to use the faiserver as APT proxy
APTPROXY=http://10.0.0.9:3142

24
config/class/FAIBASE.var Normal file
View file

@ -0,0 +1,24 @@
# default values for installation. You can override them in your *.var files
# disallow installation of packages from unsigned repositories
FAI_ALLOW_UNSIGNED=0
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=yes
TIMEZONE=Europe/Zurich
# the hash of the root password for the new installed linux system
ROOTPW=''
# 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
PARTICIPANT_USER_NAME=soi
PARTICIPANT_USER_PW='$y$j9T$h5VhMd4KkdmbxdZD1gO0N/$1hvwZgO8pQw13Xd6jaNXbtkbqVOC4W/ia/KXOcCGYvB'
if [ $FAI_ACTION = "install" ]; then
LOGUSER=fai
fi

View file

@ -0,0 +1,3 @@
SUPER_USER_NAME=superstofl
SUPER_USER_DISPLAYNAME="Admin"
SUPER_USER_PW=''