Update after finals 2023
This commit is contained in:
parent
295a111cec
commit
9e9cfaabea
|
@ -2,5 +2,5 @@ config/downloads/
|
||||||
config/simplefiles/CONTESTANT/opt/
|
config/simplefiles/CONTESTANT/opt/
|
||||||
|
|
||||||
tools/output/
|
tools/output/
|
||||||
tools/backups-*
|
tools/backups*
|
||||||
tools/certs/
|
tools/certs/
|
||||||
|
|
|
@ -9,7 +9,7 @@ if [ X$action = Xdirinstall ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
|
#grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
|
||||||
[ "$flag_menu" ] || return 0
|
[ "$flag_menu" ] || return 0
|
||||||
|
|
||||||
out=$(tty)
|
out=$(tty)
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# assign classes to hosts based on their hostname
|
# assign classes to hosts based on their hostname
|
||||||
|
|
||||||
# do not use this if a menu will be presented
|
# do not use this if a menu will be presented
|
||||||
[ "$flag_menu" ] && exit 0
|
#[ "$flag_menu" ] && exit 0
|
||||||
|
|
||||||
echo "FAIBASE DEBIAN XORG GNOME PARTICIPANT CONTESTANT"
|
echo "FAIBASE DEBIAN XORG GNOME PARTICIPANT CONTESTANT"
|
||||||
|
|
|
@ -19,6 +19,10 @@ MAXPACKAGES=800
|
||||||
PARTICIPANT_USER_NAME=soi
|
PARTICIPANT_USER_NAME=soi
|
||||||
PARTICIPANT_USER_PW='$y$j9T$h5VhMd4KkdmbxdZD1gO0N/$1hvwZgO8pQw13Xd6jaNXbtkbqVOC4W/ia/KXOcCGYvB'
|
PARTICIPANT_USER_PW='$y$j9T$h5VhMd4KkdmbxdZD1gO0N/$1hvwZgO8pQw13Xd6jaNXbtkbqVOC4W/ia/KXOcCGYvB'
|
||||||
|
|
||||||
if [ $FAI_ACTION = "install" ]; then
|
if [ "$FAI_ACTION" = "" ]; then
|
||||||
|
FAI_ACTION=install
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$FAI_ACTION" = "install" ]; then
|
||||||
LOGUSER=fai
|
LOGUSER=fai
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,7 +8,7 @@ netcat htop
|
||||||
chromium-l10n
|
chromium-l10n
|
||||||
codeblocks emacs geany gedit joe kate kdevelop nano vim vim-gtk3
|
codeblocks emacs geany gedit joe kate kdevelop nano vim vim-gtk3
|
||||||
gcc g++ gdb ddd valgrind python3 pypy
|
gcc g++ gdb ddd valgrind python3 pypy
|
||||||
evince gnome-terminal konsole byobu
|
evince gnome-terminal konsole byobu cmake
|
||||||
# from third-party repositories
|
# from third-party repositories
|
||||||
atom sublime-text code
|
atom sublime-text code
|
||||||
# requested by particants (gnome-tweaks can be used e.g. to change the function of Caps Lock key)
|
# requested by particants (gnome-tweaks can be used e.g. to change the function of Caps Lock key)
|
||||||
|
|
|
@ -16,6 +16,7 @@ $ROOTCMD systemctl disable bluetooth.service
|
||||||
$ROOTCMD systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
$ROOTCMD systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
||||||
|
|
||||||
sed -i 's|"homepage": ".*"|"homepage": "https://finals.soi.ch/"|' $target/etc/chromium/master_preferences
|
sed -i 's|"homepage": ".*"|"homepage": "https://finals.soi.ch/"|' $target/etc/chromium/master_preferences
|
||||||
|
sed -i 's|"homepage_is_newtabpage": true,|"homepage_is_newtabpage": false,|' $target/etc/chromium/master_preferences
|
||||||
|
|
||||||
# Disable panels in gnome-control-center
|
# Disable panels in gnome-control-center
|
||||||
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"
|
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"
|
||||||
|
|
|
@ -36,6 +36,20 @@ if ! grep -q '_T("soi")' $target/usr/share/codeblocks/templates/wizard/config.sc
|
||||||
sed -i 's|// project wizards|RegisterWizard(wizProject, _T("soi"), _T("A SOI task"), _T("Console"));|' $target/usr/share/codeblocks/templates/wizard/config.script
|
sed -i 's|// project wizards|RegisterWizard(wizProject, _T("soi"), _T("A SOI task"), _T("Console"));|' $target/usr/share/codeblocks/templates/wizard/config.script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add a default keyring to avoid a prompt to create one when launching Chromium
|
||||||
|
mkdir -p $target/etc/skel/.local/share/keyrings/
|
||||||
|
chmod og= $target/etc/skel/.local/share/keyrings/
|
||||||
|
echo -n "Default_keyring" > $target/etc/skel/.local/share/keyrings/default
|
||||||
|
cat > $target/etc/skel/.local/share/keyrings/Default_keyring.keyring << EOF
|
||||||
|
[keyring]
|
||||||
|
display-name=Default keyring
|
||||||
|
ctime=0
|
||||||
|
mtime=0
|
||||||
|
lock-on-idle=false
|
||||||
|
lock-after=false
|
||||||
|
EOF
|
||||||
|
chmod og= $target/etc/skel/.local/share/keyrings/Default_keyring.keyring
|
||||||
|
|
||||||
# add super user account
|
# add super user account
|
||||||
if [ -n "$SUPER_USER_NAME" ]; then
|
if [ -n "$SUPER_USER_NAME" ]; then
|
||||||
if ! $ROOTCMD getent passwd $SUPER_USER_NAME ; then
|
if ! $ROOTCMD getent passwd $SUPER_USER_NAME ; then
|
||||||
|
|
|
@ -5,7 +5,7 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
|
||||||
FAI=/var/lib/bernconfig
|
FAI=/var/lib/bernconfig
|
||||||
target=/
|
target=/
|
||||||
|
|
||||||
apt-get install libnss3-tools gnome-tweaks fonts-firacode
|
apt-get install -y libnss3-tools cmake gnome-tweaks fonts-firacode
|
||||||
|
|
||||||
rsync --archive \
|
rsync --archive \
|
||||||
--exclude /etc/apt \
|
--exclude /etc/apt \
|
||||||
|
@ -20,22 +20,40 @@ rsync --archive \
|
||||||
--exclude /root \
|
--exclude /root \
|
||||||
$FAI/simplefiles/CONTESTANT/ $target
|
$FAI/simplefiles/CONTESTANT/ $target
|
||||||
|
|
||||||
sed -i 's|firefox-esr|firefox_firefox|' $target/etc/dconf/db/local.d/00-favorite-apps
|
|
||||||
|
|
||||||
$ROOTCMD dconf update
|
$ROOTCMD dconf update
|
||||||
|
|
||||||
# Install soi header
|
# Install soi header
|
||||||
tar --overwrite -xf $FAI/downloads/soi-header.tar.gz -C $target/usr/local/include --strip-components=2 soi-header/include/
|
tar --overwrite -xf $FAI/downloads/soi-header.tar.gz -C $target/usr/local/include --strip-components=2 soi-header/include/
|
||||||
|
|
||||||
|
|
||||||
|
sed -i 's|"homepage": ".*"|"homepage": "https://finals.soi.ch/"|' $target/etc/chromium/master_preferences
|
||||||
|
sed -i 's|"homepage_is_newtabpage": true,|"homepage_is_newtabpage": false,|' $target/etc/chromium/master_preferences
|
||||||
|
|
||||||
|
# Disable sleep
|
||||||
|
$ROOTCMD systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
||||||
|
|
||||||
# Disable panels in gnome-control-center
|
# Disable panels in gnome-control-center
|
||||||
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"
|
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"
|
||||||
$DISABLE_DESKTOP /usr/share/applications/gnome-bluetooth-panel.desktop
|
$DISABLE_DESKTOP /usr/share/applications/gnome-bluetooth-panel.desktop
|
||||||
$DISABLE_DESKTOP /usr/share/applications/gnome-online-accounts-panel.desktop
|
$DISABLE_DESKTOP /usr/share/applications/gnome-online-accounts-panel.desktop
|
||||||
$DISABLE_DESKTOP /usr/share/applications/gnome-sharing-panel.desktop
|
$DISABLE_DESKTOP /usr/share/applications/gnome-sharing-panel.desktop
|
||||||
|
|
||||||
|
# Add a default keyring to avoid a prompt to create one when launching Chromium
|
||||||
|
mkdir -p $target/etc/skel/.local/share/keyrings/
|
||||||
|
chmod og= $target/etc/skel/.local/share/keyrings/
|
||||||
|
echo -n "Default_keyring" > $target/etc/skel/.local/share/keyrings/default
|
||||||
|
cat > $target/etc/skel/.local/share/keyrings/Default_keyring.keyring << EOF
|
||||||
|
[keyring]
|
||||||
|
display-name=Default keyring
|
||||||
|
ctime=0
|
||||||
|
mtime=0
|
||||||
|
lock-on-idle=false
|
||||||
|
lock-after=false
|
||||||
|
EOF
|
||||||
|
chmod og= $target/etc/skel/.local/share/keyrings/Default_keyring.keyring
|
||||||
|
|
||||||
# Auto login
|
# Auto login
|
||||||
sed -i 's/# AutomaticLoginEnable = true/AutomaticLoginEnable = true/g' $target/etc/gdm3/custom.conf
|
sed -i 's/# AutomaticLoginEnable = true/AutomaticLoginEnable = true/g' $target/etc/gdm3/daemon.conf
|
||||||
sed -i 's/# AutomaticLogin = user1/AutomaticLogin = contestant/g' $target/etc/gdm3/custom.conf
|
sed -i 's/# AutomaticLogin = user1/AutomaticLogin = contestant/g' $target/etc/gdm3/daemon.conf
|
||||||
|
|
||||||
exit $error
|
exit $error
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
[Time]
|
[Time]
|
||||||
NTP=finals.soi.ch
|
NTP=finals.soi.ch 10.0.0.9
|
||||||
FallbackNTP=10.0.0.9
|
|
||||||
|
|
|
@ -158,6 +158,11 @@ function updateCountdown () {
|
||||||
minutesToStart.toString().padStart(2, '0') + '∶' +
|
minutesToStart.toString().padStart(2, '0') + '∶' +
|
||||||
secondsToStart.toString().padStart(2, '0');
|
secondsToStart.toString().padStart(2, '0');
|
||||||
|
|
||||||
|
// Force a redraw of the entire label widget. Without this, there sometimes
|
||||||
|
// appears a small artifact to the right of the text, which is only visible
|
||||||
|
// every other second. This seems to be a bug in the rendering engine itself.
|
||||||
|
labelCountdown.queue_redraw();
|
||||||
|
|
||||||
const nextUpdateTime = 1000 - nowTime % 1000
|
const nextUpdateTime = 1000 - nowTime % 1000
|
||||||
countdownTimeoutId = GLib.timeout_add(
|
countdownTimeoutId = GLib.timeout_add(
|
||||||
GLib.PRIORITY_HIGH,
|
GLib.PRIORITY_HIGH,
|
||||||
|
|
37
readme.md
37
readme.md
|
@ -118,7 +118,6 @@ subnet 10.0.0.0 netmask 255.255.255.0 {
|
||||||
option routers 10.0.0.9;
|
option routers 10.0.0.9;
|
||||||
option domain-name "contest";
|
option domain-name "contest";
|
||||||
option domain-name-servers 10.0.0.9;
|
option domain-name-servers 10.0.0.9;
|
||||||
option time-servers 10.0.0.9;
|
|
||||||
option ntp-servers 10.0.0.9;
|
option ntp-servers 10.0.0.9;
|
||||||
server-name contestserver;
|
server-name contestserver;
|
||||||
next-server 10.0.0.9;
|
next-server 10.0.0.9;
|
||||||
|
@ -160,9 +159,6 @@ FAI_CONFIGDIR=/srv/soifai/config
|
||||||
Edit `/etc/fai/fai.conf` and uncomment `LOGUSER=fai`.
|
Edit `/etc/fai/fai.conf` and uncomment `LOGUSER=fai`.
|
||||||
|
|
||||||
Clone this repository and move it to `/srv` (move with sudo).
|
Clone this repository and move it to `/srv` (move with sudo).
|
||||||
If the fai server is on an external SSD, you can shut it down, mount the SSD on your personal laptop and copy the repo onto it, that way you don't need your private ssh key on the fai server.
|
|
||||||
Make sure that the execute bits on the scripts are also copied.
|
|
||||||
|
|
||||||
|
|
||||||
Set up FAI:
|
Set up FAI:
|
||||||
|
|
||||||
|
@ -462,13 +458,27 @@ Then, install the laptops as in the section "Installing the machines".
|
||||||
|
|
||||||
This is a list of problems that we had and how we solved them.
|
This is a list of problems that we had and how we solved them.
|
||||||
|
|
||||||
**cpptools VS code extension crashes.**
|
**DHCP server not running.**
|
||||||
Fixed by using an older of cpptools, which you can download in the "Version History" tab on the marketplace website.
|
This happens if the network cable was not plugged in when booting.
|
||||||
This happened because we were unknowingly using a pre-release.
|
```
|
||||||
|
systemctl status isc-dhcp-server.service
|
||||||
|
systemctl restart isc-dhcp-server.service
|
||||||
|
```
|
||||||
|
|
||||||
**Network booting fails.**
|
**Network booting fails.**
|
||||||
Fixed by disabling Secure Boot in the system settings.
|
Fixed by disabling Secure Boot in the system settings.
|
||||||
|
|
||||||
|
**Problems with RTL8153-based USB Ethernet adapters.**
|
||||||
|
I suspect that problems are caused by faulty firmware in the adapters.
|
||||||
|
We had a strange problem where network booting failed when the laptops were connected to a Netgear GS316P switch, but worked when connected to a Netgear GS108 switch.
|
||||||
|
The adapters have issues when connected over USB 3, but work fine over USB 2.
|
||||||
|
You can force USB 2 by connecting adapters via an USB 2 extension cable.
|
||||||
|
Half-inserting the USB connector also works in a pinch.
|
||||||
|
|
||||||
|
**Installation of packages fails.**
|
||||||
|
Check that the date is set correctly in the system settings.
|
||||||
|
If you get a HTTP 503 error, try restarting `apt-cacher-ng`.
|
||||||
|
|
||||||
**Installed system does not boot.**
|
**Installed system does not boot.**
|
||||||
Fixed by changing boot mode from legacy/BIOS to UEFI.
|
Fixed by changing boot mode from legacy/BIOS to UEFI.
|
||||||
|
|
||||||
|
@ -479,17 +489,14 @@ We don't know why this happens yet, but we have a workaround: Just run `systemct
|
||||||
parallel-ssh -h hostlist systemctl start gdm
|
parallel-ssh -h hostlist systemctl start gdm
|
||||||
```
|
```
|
||||||
|
|
||||||
**dhcp server not running.**
|
**User indicator does not appear.**
|
||||||
This happens if the network cable was not plugged in when booting.
|
|
||||||
```
|
|
||||||
systemctl status isc-dhcp-server.service
|
|
||||||
systemctl restart isc-dhcp-server.service
|
|
||||||
```
|
|
||||||
|
|
||||||
**User indicator does not appear**
|
|
||||||
Fixed by adding the gnome shell version from `gnome-shell --version` to the list of supported versions: `shell-version` in `simplefiles/CONTESTANT/usr/share/gnome-shell/extensions/user-indicator@soi.ch/metadata.json`.
|
Fixed by adding the gnome shell version from `gnome-shell --version` to the list of supported versions: `shell-version` in `simplefiles/CONTESTANT/usr/share/gnome-shell/extensions/user-indicator@soi.ch/metadata.json`.
|
||||||
The same applies for the contest-lock extension.
|
The same applies for the contest-lock extension.
|
||||||
|
|
||||||
|
**cpptools VS code extension crashes.**
|
||||||
|
Fixed by using an older of cpptools, which you can download in the "Version History" tab on the marketplace website.
|
||||||
|
This happened because we were unknowingly using a pre-release.
|
||||||
|
|
||||||
|
|
||||||
## Config space
|
## Config space
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@ cat <<EOF > ca.json
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cfssl gencert -initca ca.json | cfssljson -bare ca
|
if [ ! -f ca.pem ]; then
|
||||||
|
cfssl gencert -initca ca.json | cfssljson -bare ca
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF >client-config.json
|
cat <<EOF >client-config.json
|
||||||
{
|
{
|
||||||
|
|
Reference in New Issue