diff options
| author | Jonathan Bauer | 2016-01-08 14:26:46 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2016-01-08 14:26:46 +0100 |
| commit | afac4babef160c92ba32d562910c2d60ee861831 (patch) | |
| tree | aa048645a376cc5fcc980a7b1c1df2f0ad88236d /remote/modules/safe-mode/data/opt | |
| parent | [busybox] enable 'who' (diff) | |
| download | tm-scripts-afac4babef160c92ba32d562910c2d60ee861831.tar.gz tm-scripts-afac4babef160c92ba32d562910c2d60ee861831.tar.xz tm-scripts-afac4babef160c92ba32d562910c2d60ee861831.zip | |
[exam] renamed safe-mode service to 'exam.service' and removed unneeded code
removed the iptables script to only allow the institution network (e.g. 132.230.x.x)
This needs to be done elsewhere!
Diffstat (limited to 'remote/modules/safe-mode/data/opt')
| -rwxr-xr-x | remote/modules/safe-mode/data/opt/openslx/iptables/rules.d/00-internal-network | 16 | ||||
| -rwxr-xr-x | remote/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode | 35 |
2 files changed, 0 insertions, 51 deletions
diff --git a/remote/modules/safe-mode/data/opt/openslx/iptables/rules.d/00-internal-network b/remote/modules/safe-mode/data/opt/openslx/iptables/rules.d/00-internal-network deleted file mode 100755 index a3a1b033..00000000 --- a/remote/modules/safe-mode/data/opt/openslx/iptables/rules.d/00-internal-network +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/ash - -. /opt/openslx/config - -[ -z "$SLX_BROWSER_START_URL" ] && exit 0 - -# identify subnet of br0's ip adress -[ -z "$SLX_PXE_CLIENT_IP" ] && echo "No client IP found in '/opt/openslx/config'." && exit 1 - -# lets build the subnet string -SLX_LOCAL_SUBNET="$(echo "${SLX_PXE_CLIENT_IP}" | awk -F "." '{print $1"."$2".0.0/16"}')" -[ -z "${SLX_LOCAL_SUBNET}" ] && echo "No ip range to allow. Exiting..." && exit 1 -# now create the iptables rule for openslx-iptables stuff -# first as a temp file, then we move it to the real destination -iptables -A INPUT -i br0 -p tcp -s "${SLX_LOCAL_SUBNET}" -j ACCEPT -iptables -A INPUT -i br0 -p tcp -j REJECT diff --git a/remote/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode b/remote/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode index 6e66b35d..ebcee099 100755 --- a/remote/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode +++ b/remote/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode @@ -19,41 +19,6 @@ disable_magic_keys() { echo 0 > /proc/sys/kernel/sysrq } -disable_cron_idleaction() { - rm /opt/openslx/scripts/idleaction-cron_script \ - /opt/openslx/scripts/idleaction-scheduled_poweroff \ - /opt/openslx/scripts/idleaction-scheduled_reboot -} - -disable_systemd_auto_vt() { - sed -i 's/.*NAutoVTs=.*/NAutoVTs=0/g' "/etc/systemd/logind.conf" - systemctl restart systemd-logind -} - -set_default_session() { - [ ! -e "/usr/share/xsessions/firefox.desktop" ] && \ - echo "No firefox session found." && return 1 - # we have it, copy it over default session - cp "/usr/share/xsessions/firefox.desktop" "/opt/openslx/xsessions/default.desktop" -} - -no_autologin_delay() { - [ ! -e "/etc/kde4/kdm/kdmrc" ] && \ - echo "Could not find '/etc/kde4/kdm/kdmrc'." && return 1 - sed -i 's/^AutoLoginDelay=.*/AutoLoginDelay=0/g' "/etc/kde4/kdm/kdmrc" -} - - -. /opt/openslx/config - -[ -z "$SLX_BROWSER_START_URL" ] && \ - echo "Not running in E-Klausur mode!" && \ - exit 1 - disable_tty_switch disable_openbox_menu disable_magic_keys -disable_cron_idleaction -disable_systemd_auto_vt -no_autologin_delay -set_default_session |
