This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch heuler/openbox-magic-pixel-workaround-bookworm in repository live-build-x2go.
commit e8c8708d18869405371cf105eb33314a454dfff6 Author: Stefan Baur (BAUR-ITCS) <kont...@baur-itcs.de> Date: Tue Jan 23 14:05:01 2024 +0100 de-array-ified, as we are forced to use dash instead of bash --- .../etc/X11/Xsession.d/61x11-start-x2goclient | 38 +++++++++++++--------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient b/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient index e22b47e..c410940 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient +++ b/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient @@ -72,27 +72,35 @@ if [ -n "$THROTTLEVALUES" ]; then MAXSPEEDMBIT=$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') MAXSPEEDKBYTE=$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte - THROTTLEARR=($(echo $THROTTLEVALUES | awk -F ':' '$1 ~/^[0-9\.u]*$/ && $2 ~/^[0-9\.u]*$/ && $3 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ { print $1 " " $2 " " $3 " " $4 " " $5}')) - if [ -n "${THROTTLEARR[0]}" ] && [ "${THROTTLEARR[0]}" != "u" ]; then - THROTTLEDOWN="-d ${THROTTLEARR[0]}" # default 10, never used - elif [ "${THROTTLEARR[0]}" = "u" ]; then + THROTTLEARR=$(echo $THROTTLEVALUES | awk -F ':' '$1 ~/^[0-9\.u]*$/ && $2 ~/^[0-9\.u]*$/ && $3 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ { print $1 " " $2 " " $3 " " $4 " " $5}') + + THROTTLEARR1=$(echo $THROTTLEARR | cut -d ' ' -f 1) + THROTTLEARR2=$(echo $THROTTLEARR | cut -d ' ' -f 2) + THROTTLEARR3=$(echo $THROTTLEARR | cut -d ' ' -f 3) + THROTTLEARR4=$(echo $THROTTLEARR | cut -d ' ' -f 4) + THROTTLEARR5=$(echo $THROTTLEARR | cut -d ' ' -f 5) + + + if [ -n "$THROTTLEARR1" ] && [ "$THROTTLEARR1" != "u" ]; then + THROTTLEDOWN="-d $THROTTLEARR1" # default 10, never used + elif [ "$THROTTLEARR1" = "u" ]; then THROTTLEDOWN="-d $MAXSPEEDKBYTE" fi - if [ -n "${THROTTLEARR[1]}" ] && [ "${THROTTLEARR[1]}" != "u" ]; then - THROTTLEUP="-u ${THROTTLEARR[1]}" # default 10, never used - elif [ "${THROTTLEARR[1]}" = "u" ]; then + if [ -n "$THROTTLEARR2" ] && [ "$THROTTLEARR2" != "u" ]; then + THROTTLEUP="-u $THROTTLEARR2" # default 10, never used + elif [ "$THROTTLEARR2" = "u" ]; then THROTTLEUP="-d $MAXSPEEDKBYTE" - elif [ -z "${THROTTLEARR[1]}" ] ; then - THROTTLEUP="-d ${THROTTLEARR[0]}" # set up=down if only 1 param + elif [ -z "$THROTTLEARR2" ] ; then + THROTTLEUP="-d $THROTTLEARR1" # set up=down if only 1 param fi - if [ -n "${THROTTLEARR[2]}" ] ; then - THROTTLETIME="-t ${THROTTLEARR[2]}" # default 3.0 + if [ -n "$THROTTLEARR3" ] ; then + THROTTLETIME="-t $THROTTLEARR3" # default 3.0 fi - if [ -n "${THROTTLEARR[3]}" ] ; then - THROTTLELENGTH="-l ${THROTTLEARR[3]}" # default 20 + if [ -n "$THROTTLEARR4" ] ; then + THROTTLELENGTH="-l $THROTTLEARR4" # default 20 fi - if [ -n "${THROTTLEARR[4]}" ] ; then - THROTTLELATENCY="-L ${THROTTLEARR[4]}" # default 0 + if [ -n "${THROTTLEARR5" ] ; then + THROTTLELATENCY="-L $THROTTLEARR5" # default 0 fi # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly if [ -n "$THROTTLEUP" ] || [ -n "$THROTTLEDOWN" ] || [ -n "$THROTTLETIME" ] || [ -n "$THROTTLELENGTH" ] || [ -n "$THROTTLELATENCY" ]; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org https://lists.x2go.org/listinfo/x2go-commits