diff options
| author | Jonathan Bauer | 2015-10-29 13:25:59 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2015-10-29 13:25:59 +0100 |
| commit | f44812d259866c66409f3c373ba2626efae5ec95 (patch) | |
| tree | 00992e6c64d7e9c9fe060a0c6dd7267e1776e76a | |
| parent | [cups-freiburg] removed RZMONO2 since it's long dead (diff) | |
| parent | [rootfs-*] Disable 'demo' login, support $SLX_DEMO_PASS to set a password via... (diff) | |
| download | tm-scripts-f44812d259866c66409f3c373ba2626efae5ec95.tar.gz tm-scripts-f44812d259866c66409f3c373ba2626efae5ec95.tar.xz tm-scripts-f44812d259866c66409f3c373ba2626efae5ec95.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
| -rw-r--r-- | remote/modules/cups/module.conf | 1 | ||||
| -rw-r--r-- | remote/modules/kernel-vanilla/module.conf | 2 | ||||
| -rwxr-xr-x | remote/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy | 17 | ||||
| -rwxr-xr-x | remote/rootfs/rootfs-stage31/data/init | 4 | ||||
| -rw-r--r-- | remote/rootfs/rootfs-stage32/module.build | 4 | ||||
| -rw-r--r-- | remote/rootfs/rootfs-stage32/module.conf | 3 |
6 files changed, 20 insertions, 11 deletions
diff --git a/remote/modules/cups/module.conf b/remote/modules/cups/module.conf index 513389b5..6ec99ac9 100644 --- a/remote/modules/cups/module.conf +++ b/remote/modules/cups/module.conf @@ -7,6 +7,7 @@ REQUIRED_DIRECTORIES=" /usr/lib/cups/ /usr/share/cups/ /usr/share/ghostscript/ + /usr/share/ppd/cupsfilters/ /usr/bin/ " REQUIRED_FILES="" diff --git a/remote/modules/kernel-vanilla/module.conf b/remote/modules/kernel-vanilla/module.conf index 68a0034b..9e9d8fab 100644 --- a/remote/modules/kernel-vanilla/module.conf +++ b/remote/modules/kernel-vanilla/module.conf @@ -1,5 +1,5 @@ REQUIRED_BINARIES="" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="" -REQUIRED_KERNEL="4.2.3" +REQUIRED_KERNEL="4.2.4" REQUIRED_GIT="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git" diff --git a/remote/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy b/remote/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy index 86b19e97..97ef8225 100755 --- a/remote/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy +++ b/remote/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy @@ -16,17 +16,18 @@ 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][0-9]\. ]] && PROXY=on + # auto detection: check if it is actually needed + RET=$(curl -m 2 -s http://www.google.de/ | grep -o google | wc -l) + if [ $RET -lt 20 ]; then + sleep 4 + RET=$(curl -m 5 -s http://www.google.de/ | grep -o google | wc -l) + fi + [ $RET -gt 20 ] && echo "Auto detect: Internet is reachable without proxy." && exit 0 + PROXY=on fi [ "$PROXY" == "off" ] && echo "Proxy mode not required." && exit 0 - -# wants a proxy from the config file and the client's ip, check if it is actually needed -/opt/openslx/bin/ping -w 5 -c 3 www.google.de -RET=$? -[ $RET -eq 0 ] && echo "Internet is reachable without proxy." && exit 0 +echo "Setting up transparent proxying via $SLX_PROXY_IP" 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 diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index 9daa6d58..7c66cd11 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -95,6 +95,10 @@ cp -a "/inc/functions" "${FUTURE_ROOT}/opt/openslx/inc/" if [ ! -z "$SLX_ROOT_PASS" ]; then sed -i "s#^root:[^:]*:#root:$SLX_ROOT_PASS:#" "${FUTURE_ROOT}/etc/shadow" fi +# set the SLX_DEMO_PASS if given in config +if [ ! -z "$SLX_DEMO_PASS" ]; then + sed -i "s#^demo:[^:]*:#demo:$SLX_DEMO_PASS:#" "${FUTURE_ROOT}/etc/shadow" +fi # one last debug shell if activated [ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root." diff --git a/remote/rootfs/rootfs-stage32/module.build b/remote/rootfs/rootfs-stage32/module.build index d855f5e5..4fbc26b5 100644 --- a/remote/rootfs/rootfs-stage32/module.build +++ b/remote/rootfs/rootfs-stage32/module.build @@ -104,8 +104,8 @@ post_copy() { add_user "nobody" # setup root account - USER=root add_user - DEMO_ID="$(USER=demo PASSWORD=demo USERHOME=/home/demo USERSHELL=/bin/bash add_user)" + PASSWORD= USER=root add_user + DEMO_ID="$(USER=demo PASSWORD= USERHOME=/home/demo USERSHELL=/bin/bash add_user)" mkdir -p "${TARGET_BUILD_DIR}/root" mkdir -p "${TARGET_BUILD_DIR}/home/demo" diff --git a/remote/rootfs/rootfs-stage32/module.conf b/remote/rootfs/rootfs-stage32/module.conf index e7a9142f..3a671883 100644 --- a/remote/rootfs/rootfs-stage32/module.conf +++ b/remote/rootfs/rootfs-stage32/module.conf @@ -38,6 +38,9 @@ REQUIRED_BINARIES=" getent ldconfig grep + sed + date + cat " REQUIRED_LIBRARIES=" libcap |
