From fc611666134f8b4a1073eca14bb2ecfe1b3aa954 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 8 Jan 2016 11:50:40 +0100 Subject: Preparations for exam mode --- remote/rootfs/rootfs-stage31/data/init | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'remote/rootfs') 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" < "${FUTURE_ROOT}/opt/openslx/.benchmark" # Prepare environment (HOME is needed as a hack for nss_ldap with ssl and no caching) -- cgit v1.2.3-55-g7522