summaryrefslogtreecommitdiffstats
path: root/remote/rootfs
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-08 11:50:40 +0100
committerSimon Rettberg2016-01-08 11:50:40 +0100
commitfc611666134f8b4a1073eca14bb2ecfe1b3aa954 (patch)
tree29c0fd9a33c4e2bcd61d95517318f69bcac47d3e /remote/rootfs
parent[run-virt] TMPDIR is now set globally in set_runvirt_variables.inc (diff)
downloadtm-scripts-fc611666134f8b4a1073eca14bb2ecfe1b3aa954.tar.gz
tm-scripts-fc611666134f8b4a1073eca14bb2ecfe1b3aa954.tar.xz
tm-scripts-fc611666134f8b4a1073eca14bb2ecfe1b3aa954.zip
Preparations for exam mode
Diffstat (limited to 'remote/rootfs')
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init38
1 files changed, 38 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 7c66cd11..51010ffa 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -111,6 +111,44 @@ for mnt in proc sys run ; do
busybox umount -f -l "/$mnt" 2>/dev/null
done
+# HACK HACK: Klausurmodus
+# Putting this here as we're hopefully moving to the all new dracut solution soon
+# so there's no reason to make it pretty now
+if [ -n "$SLX_EXAM" ]; then
+ # Visual: Make kdm all orange
+ sed -i 's/#e3e4e9/#f9a72b/g' "${FUTURE_ROOT}/usr/share/desktop/themes/kdm/bwlehrpool/theme.xml"
+ # Visual: Move splash screen to upper left corner
+ if [ -e "/etc/splash.ppm.gz" ]; then
+ fbsplash -b -s "/etc/splash.ppm.gz" &
+ elif [ -e "/etc/splash.ppm" ]; then
+ fbsplash -b -s "/etc/splash.ppm" &
+ fi
+ # Visual: ssh banner
+ echo "+ - - - - KLAUSURMODUS AKTIV - - - - +" >> "${FUTURE_ROOT}/etc/issue.net"
+ echo "++++++++++++++++++++++++++++++++++++++" >> "${FUTURE_ROOT}/etc/issue.net"
+ # Disable some services, ldap/ad
+ rm -- "${FUTURE_ROOT}/etc/systemd/system/network.target.wants/sssd.service"
+ sed -i 's/ sss//' "${FUTURE_ROOT}/etc/nsswitch.conf"
+ # Disable ctrl-alt-delete
+ rm -- "${FUTURE_ROOT}/usr/lib/systemd/system/ctrl-alt-del.target"
+ # No idleaction
+ rm -- "${FUTURE_ROOT}/etc/cron.d/openslx-idleaction"
+ # Ignore everything but power button
+ cat > "${FUTURE_ROOT}/etc/systemd/logind.conf" <<EOF
+[Login]
+NAutoVTs=0
+ReserveVT=0
+KillUserProcesses=no
+HandlePowerKey=poweroff
+HandleSuspendKey=ignore
+HandleHibernateKey=ignore
+HandleLidSwitch=ignore
+IdleAction=ignore
+EOF
+ # Link exam.service in sysinit.target
+ ln -s "../exam.service" "${FUTURE_ROOT}/etc/systemd/system/sysinit.target.wants/exam.service"
+fi
+
echo "Switching root...."
echo "$bench_result" > "${FUTURE_ROOT}/opt/openslx/.benchmark"
# Prepare environment (HOME is needed as a hack for nss_ldap with ssl and no caching)