summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Rößler2018-08-06 16:32:21 +0200
committerChristian Rößler2018-08-06 16:32:21 +0200
commit68d5e6b52e71014cf154e7e86ce448c813b74f4e (patch)
tree1a252ab7e7eafc5bf40292911f1d6cbe6abfd998
parent[run-virt] linux script: Waiting when starting script minimised. (diff)
downloadmltk-68d5e6b52e71014cf154e7e86ce448c813b74f4e.tar.gz
mltk-68d5e6b52e71014cf154e7e86ce448c813b74f4e.tar.xz
mltk-68d5e6b52e71014cf154e7e86ce448c813b74f4e.zip
[run-virt] Linux mount script: very shitty bug (hexdump), some minor stuff.
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/LIESMICH0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/README0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/00_vars.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_functions.inc13
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_preliminaries.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/15_set_trapping.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/20_get_creds.inc6
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_get_shares.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_mount_shares.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/40_check_fallback.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_postliminaries.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_umounter.inc0
-rwxr-xr-x[-rw-r--r--]core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/60_resolution.inc2
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/90_runscript.inc1
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/vmchooser/data/linux/vm_installer1
15 files changed, 12 insertions, 11 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/LIESMICH b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/LIESMICH
index 8ef4256b..8ef4256b 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/LIESMICH
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/LIESMICH
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/README b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/README
index 53576259..53576259 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/README
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/README
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 939becf6..939becf6 100644..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
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 38213e86..75b61ae7 100644..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,18 +3,19 @@
### Funktionen Mounter ############################
function xor()
-{ local RES=($(echo "$1" | sed "s/../0x& /g"))
- shift 1
- while [[ "$1" ]]; do
- local ONE=($(echo "$1" | sed "s/../0x& /g"))
+{ 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
- shift 1
- 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/10_preliminaries.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_preliminaries.inc
index bcbd6ec1..bcbd6ec1 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_preliminaries.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/10_preliminaries.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/15_set_trapping.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/15_set_trapping.inc
index c49b99ff..c49b99ff 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/15_set_trapping.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/15_set_trapping.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/20_get_creds.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/20_get_creds.inc
index f0081658..c9043e21 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/20_get_creds.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/20_get_creds.inc
@@ -19,9 +19,9 @@ function get_creds()
ANZAHL=$((16#$(dd if=$RAWKEYTEMP bs=1 count=2 2>/dev/null|hexdump -e '1/1 "%02x"')))
# Und raus-xor-en:
- PW=$( xor $(dd if="$RAWKEYTEMP" bs=1 skip=2 2>/dev/null|hexdump -e '1/1 "%02x"') \
- $(head -n 1 "$CONFIGFILE" | cut -f 4 -d$'\t') | sed 's/../\\x&/g')
+ PW=$( xor "$(dd if="$RAWKEYTEMP" bs=1 skip=2 count="$ANZAHL" 2>/dev/null|hexdump -v -e '1/1 "%02x"')" \
+ "$(head -n 1 "$CONFIGFILE" | cut -f 4 -d$'\t')" | sed 's/../\\x&/g')
PW=$(echo -e "$PW") # \x...-Ausdrücke zu ASCII
- PW="${PW:0:${ANZAHL}}" # ...und Rest nach ANZAHL abhacken.
+# PW="${PW:0:${ANZAHL}}" # ...und Rest nach ANZAHL abhacken.
}
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_get_shares.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_get_shares.inc
index 70b17236..70b17236 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_get_shares.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_get_shares.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_mount_shares.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_mount_shares.inc
index 7447dd41..7447dd41 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_mount_shares.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/30_mount_shares.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/40_check_fallback.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/40_check_fallback.inc
index 14a13f77..14a13f77 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/40_check_fallback.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/40_check_fallback.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_postliminaries.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_postliminaries.inc
index f6f1cf7d..f6f1cf7d 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_postliminaries.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_postliminaries.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_umounter.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_umounter.inc
index e161b961..e161b961 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_umounter.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/50_umounter.inc
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/60_resolution.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/60_resolution.inc
index 66433663..cdb895bf 100644..100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/60_resolution.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/includes/60_resolution.inc
@@ -25,7 +25,7 @@ set_resolution()
# Zu verbessern: Der Name des Verbundenen ist nicht immer bekannt. Daher nehmen wir das
# erste 'connected' in der Ausgabe xrandrs Und warten evtl. ein Weilchen)::
- for wartezeit in 1 1 1 2 2 2 4 4 0 ende; do
+ for wartezeit in 1 1 1 2 2 2 4 4 8 8 0 ende; do
[ "$wartezeit" = "ende" ] && { logger "openslx resolution utility: Could not detect output device. Exiting." ; exit 1; }
AUSGABE=$(DISPLAY="${DISPLAY}" XAUTHORITY="${XAUTHORITY}" xrandr -q|grep -m 1 " connected "|awk '{print $1}')
[ -n "$AUSGABE" ] && break
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 55ecc254..4017cc30 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
@@ -46,7 +46,6 @@ 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}" &
;;
*) # *=?
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/vm_installer b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/vm_installer
index ba43b6f6..91f5b6d2 100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/vm_installer
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/vm_installer
@@ -60,6 +60,7 @@ case $(${PS} --pid 1 -o comm h) in
Description=openslx utility script
After=$TARGET
Requires=${SERVICEDISKMOUNT}
+ DefaultDependencies=no
[Service]
Type=oneshot