diff options
author | Christian Rößler | 2018-08-07 16:25:43 +0200 |
---|---|---|
committer | Christian Rößler | 2018-08-07 16:25:43 +0200 |
commit | 2dbd560ca1518636db6ed4c0e22cb19fcde7ee3f (patch) | |
tree | f18694737ccc747204e1618477bdfaec92f340b0 /core | |
parent | [run-virt] Linux scripts: Links to shares now in desktop directory (diff) | |
download | mltk-2dbd560ca1518636db6ed4c0e22cb19fcde7ee3f.tar.gz mltk-2dbd560ca1518636db6ed4c0e22cb19fcde7ee3f.tar.xz mltk-2dbd560ca1518636db6ed4c0e22cb19fcde7ee3f.zip |
[run-virt] Linux scripts: Misfired checkin corr., new userdesktop var, su expr. corr.
Diffstat (limited to 'core')
3 files changed, 10 insertions, 15 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/00_vars.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/00_vars.inc index ad29d78d..60673811 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/00_vars.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/00_vars.inc @@ -2,7 +2,7 @@ LOCALUSER=student USERHOME=/home/"$LOCALUSER" USERHOMEDIR=/home/"$LOCALUSER"/PERSISTENT -USERDESKTOP=$(xdg-user-dir DESKTOP) +USERDESKTOP=$(su -c - $LOCALUSER "xdg-user-dir DESKTOP") [ "$USERDESKTOP" == "" ] && USERDESKTOP="$USERHOME" DISKMOUNTDIR=/mnt/diskmount diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_functions.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_functions.inc index 2336753e..a4d559a3 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_functions.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_functions.inc @@ -3,19 +3,14 @@ ### Funktionen Mounter ############################ function xor() -{ local LOGDAT=/tmp/getanzahl.pw.$(date +%H%M%S.%N) - echo "Param 1+2: $1 $2" >> $LOGDAT - local RES=($(echo "$1" | sed "s/../0x& /g")) - local ONE=($(echo "$2" | sed "s/../0x& /g")) - local COUNT1=${#RES[@]} - local COUNT2=${#ONE[@]} - echo "count1+2: $COUNT1 -- $COUNT2 ">>"$LOGDAT" - for (( i = 0; i < $COUNT1; i++ )); do - RES[$i]=$((${ONE[$(( i % COUNT2 ))]:-0} ^ ${RES[$i]:-0})) - echo "${RES[$i]}">>"$LOGDAT" - done +{ local RES=($(echo "$1" | sed "s/../0x& /g")) + local ONE=($(echo "$2" | sed "s/../0x& /g")) + local COUNT1=${#RES[@]} + local COUNT2=${#ONE[@]} + for (( i = 0; i < $COUNT1; i++ )); do + RES[$i]=$((${ONE[$(( i % COUNT2 ))]:-0} ^ ${RES[$i]:-0})) + done printf "%02x" "${RES[@]}" - printf "%02x" "${RES[@]}" >>"$LOGDAT" } function already_mounted() diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/90_runscript.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/90_runscript.inc index 4017cc30..cd17bd3b 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/90_runscript.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/90_runscript.inc @@ -36,7 +36,7 @@ function runscript() logger "openslx utility: runscript: Starting script maximised." get_xauthfile wait_for_wm - DISPLAY=:0.0 XAUTHORITY="${XAUTHORITY}" $USERPART xterm "$DISKMOUNTDIR/runscript${SCRIPTEXT}" & + DISPLAY=:0.0 XAUTHORITY="${XAUTHORITY}" $USERPART "xterm $DISKMOUNTDIR/runscript${SCRIPTEXT}" & ;; 2) # 2=minimized (xterm -iconic) logger "openslx utility: runscript: starting script minimised." @@ -46,7 +46,7 @@ function runscript() # Truly not the best way to wait until the desktop environment is ready, but there's no common way to # check for DE readiness. Until then, we'll sleep. sleep 20 - DISPLAY=:0.0 XAUTHORITY="${XAUTHORITY}" $USERPART xterm -iconic "$DISKMOUNTDIR/runscript${SCRIPTEXT}" & + DISPLAY=:0.0 XAUTHORITY="${XAUTHORITY}" $USERPART "xterm -iconic $DISKMOUNTDIR/runscript${SCRIPTEXT}" & ;; *) # *=? logger "openslx utility: runscript: unkown scriptVisibility $SCRIPTVISIBILITY." |