diff options
Diffstat (limited to 'remote/modules')
| -rwxr-xr-x | remote/modules/german/data/opt/openslx/bin/load_german_keymaps | 22 | ||||
| -rwxr-xr-x | remote/modules/redsocks/data/opt/openslx/bin/setup_proxy | 51 |
2 files changed, 0 insertions, 73 deletions
diff --git a/remote/modules/german/data/opt/openslx/bin/load_german_keymaps b/remote/modules/german/data/opt/openslx/bin/load_german_keymaps deleted file mode 100755 index c7dbbb33..00000000 --- a/remote/modules/german/data/opt/openslx/bin/load_german_keymaps +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# Script serves as container script for a systemd-call due to the buggyness of several -# loadkeys-implementations <= kbd (Linux keyboard tools) 1.15.3. -# This bug can be detected through failure of the command pipe 'dumpkeys|loadkeys' yielding -# the message "unknown keysym 'compose'. - -# So we first try to insert a keymap including compose-lines: -loadkeys /opt/openslx/keymaps/german_qwertz_compose_keyboard_translation.map -ERR=$? - -# ... if this fails we enter a keymap without compose-lines: -if [[ "$ERR" -eq 0 ]]; then - exit 0 # in that case everything went smooth - exit. -else - loadkeys /opt/openslx/keymaps/german_qwertz_keyboard_translation.map # insert a keymap without compose lines - ERR=$? -fi - -# if at this point the second keymap insertion failed we pass the errorlevel to -# systemd - we cannot do more at this point. - -exit $ERR diff --git a/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy b/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy deleted file mode 100755 index 6c39c077..00000000 --- a/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -for wait in 1 1 2 3 4 6 8 10 end; do - grep '^#_RCONFIG_TAG$' /opt/openslx/config > /dev/null && echo "Config found!" && break - [ "$wait" == "end" ] && echo "Giving up!" && exit 1 - echo "No config yet..." - sleep $wait -done - -. /opt/openslx/config || echo "Error sourcing config for setup_proxy" - -[ -z "$SLX_PROXY_MODE" -o "x$SLX_PROXY_MODE" == "xoff" ] && echo "proxy mode disabled." && exit 0 - -PROXY=off -if [ "$SLX_PROXY_MODE" == "on" ]; then - PROXY=on -elif [ "$SLX_PROXY_MODE" == "auto" -a -n "$SLX_PXE_CLIENT_IP" ]; then - [[ "$SLX_PXE_CLIENT_IP" =~ ^10\. ]] && PROXY=on - [[ "$SLX_PXE_CLIENT_IP" =~ ^192\.168\. ]] && PROXY=on - [[ "$SLX_PXE_CLIENT_IP" =~ ^172\.[123] ]] && PROXY=on -fi - -[ "$PROXY" == "off" ] && echo "Proxy mode not required." && exit 0 - -sed -i "s/%%PROXY_IP%%/$SLX_PROXY_IP/g;s/%%PROXY_PORT%%/$SLX_PROXY_PORT/g;s/%%PROXY_TYPE%%/$SLX_PROXY_TYPE/g" /etc/redsocks.conf - -mkdir -p /run/redsocks -chown redsocks:redsocks /run/redsocks -systemctl start redsocks - -iptables -t nat -N REDSOCKS -iptables -t nat -A REDSOCKS -d "$SLX_PROXY_IP" -j RETURN -iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN -iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN -iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN -iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN -iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN -iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN -iptables -t nat -A REDSOCKS -d 224.0.0.0/4 -j RETURN -iptables -t nat -A REDSOCKS -d 240.0.0.0/4 -j RETURN -if [ -n "$SLX_PROXY_BLACKLIST" ]; then - for ADDR in $SLX_PROXY_BLACKLIST; do - iptables -t nat -A REDSOCKS -d "$ADDR" -j RETURN - done -fi -iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-port 12345 -iptables -t nat -A PREROUTING -p tcp -j REDSOCKS -iptables -t nat -A OUTPUT -p tcp -j REDSOCKS -iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE -iptables -A INPUT -i br0 -p tcp --dport 12345 -j DROP - |
