This repository has been archived on 2024-05-18. You can view files and clone it, but cannot push or open issues or pull requests.
soifai/config/setup-bern.sh

42 lines
1.3 KiB
Bash
Raw Normal View History

2022-07-15 11:59:26 +02:00
#! /bin/bash
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
FAI=/var/lib/bernconfig
target=/
apt-get install libnss3-tools gnome-tweaks fonts-firacode
rsync --archive \
--exclude /etc/apt \
--exclude /usr/share/keyrings \
--exclude /etc/ssh \
$FAI/simplefiles/PARTICIPANT/ $target
rsync --archive \
--exclude /etc/systemd/timesyncd.conf.d \
--exclude /etc/hosts \
--exclude /etc/nftables.conf \
--exclude /root \
$FAI/simplefiles/CONTESTANT/ $target
sed -i 's|firefox-esr|firefox_firefox|' $target/etc/dconf/db/local.d/00-favorite-apps
$ROOTCMD dconf update
# Install soi header
tar --overwrite -xf $FAI/downloads/soi-header.tar.gz -C $target/usr/local/include --strip-components=2 soi-header/include/
# Disable panels in gnome-control-center
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-online-accounts-panel.desktop
$DISABLE_DESKTOP /usr/share/applications/gnome-sharing-panel.desktop
# Auto login
sed -i 's/# AutomaticLoginEnable = true/AutomaticLoginEnable = true/g' $target/etc/gdm3/custom.conf
sed -i 's/# AutomaticLogin = user1/AutomaticLogin = contestant/g' $target/etc/gdm3/custom.conf
exit $error