diff options
author | Sebastian | 2016-04-25 12:01:08 +0200 |
---|---|---|
committer | Sebastian | 2016-04-25 12:01:08 +0200 |
commit | 5acda3eaeabae9045609539303a8c12c4ce401f1 (patch) | |
tree | 7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/vmchooser2/data | |
parent | initial commit (diff) | |
download | mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip |
merge with latest dev version
Diffstat (limited to 'core/modules/vmchooser2/data')
7 files changed, 65 insertions, 0 deletions
diff --git a/core/modules/vmchooser2/data/etc/tmpfiles.d/vmchooser-cache.conf b/core/modules/vmchooser2/data/etc/tmpfiles.d/vmchooser-cache.conf new file mode 100644 index 00000000..3b2219d1 --- /dev/null +++ b/core/modules/vmchooser2/data/etc/tmpfiles.d/vmchooser-cache.conf @@ -0,0 +1,2 @@ +d /tmp/vmchooser2 0777 root root +d /tmp/vmchooser2/icons 0777 root root diff --git a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser new file mode 100755 index 00000000..a99207ff --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser @@ -0,0 +1,36 @@ +#!/bin/ash + +# This script launches the real vmchooser (vmchooser.real) +# It's here to pass the XML URL, coming from +# /opt/openslx/config, as well as the pool filter (if any) + +. /opt/openslx/config + +if [ -n "$SLX_VMCHOOSER_BASE_URL" ]; then + URL="$SLX_VMCHOOSER_BASE_URL" +elif [ -n "$SLX_PXE_SERVER_IP" ]; then + URL="http://$SLX_PXE_SERVER_IP/vmchooser/" +else + slxlog "virt-vmchooser" "vmchooser: Could not determine URL to fetch VM list from! (need SLX_VMCHOOSER_BASE_URL)" + # TODO: Tell user +fi + +MEM=$(grep -m1 '^MemTotal:' /proc/meminfo | awk '{print $2}') +if [ -n "$SLX_VMCHOOSER_TAB" ] && [ "$SLX_VMCHOOSER_TAB" -ge 0 -a "$SLX_VMCHOOSER_TAB" -le 2 ] 2>/dev/null; then + TAB="$SLX_VMCHOOSER_TAB" +elif [ "$MEM" -lt 3000000 ]; then # Check RAM size; if it's not that much, default to the native linux sessions + TAB=0 +else + TAB=2 +fi + +EXTRA= +[ -n "$SLX_VMCHOOSER_TEMPLATES" ] && EXTRA="$EXTRA --template-mode $SLX_VMCHOOSER_TEMPLATES" +[ -n "$SLX_VMCHOOSER_FORLOCATION" ] && EXTRA="$EXTRA --location-mode $SLX_VMCHOOSER_FORLOCATION" + +if [ -z "$SLX_LOCATIONS" ]; then + exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" $EXTRA +fi + +exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" --locations "$SLX_LOCATIONS" $EXTRA + diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart new file mode 100755 index 00000000..1cc7eb5f --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart @@ -0,0 +1,18 @@ +#!/bin/ash + +SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d" + +if [ -d "$SOURCEPATH" ]; then + for file in $SOURCEPATH/*; do + "$file" + RET=$? + if [ "$RET" != 0 ]; then + param="$file" + [ "$(head -n 1 "$file" | cut -b 1)" != "#" ] && param= + slxlog "vmchooser-sessionstart" "$file returned $RET at session start!" "$param" + fi + done +fi + +exit 0 + diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart.d/log-selected-session b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart.d/log-selected-session new file mode 100755 index 00000000..2499b3b7 --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart.d/log-selected-session @@ -0,0 +1,5 @@ +#!/bin/ash + +[ -n "$SESSION_NAME" ] && slxlog ".vmchooser-session-name" "$SESSION_NAME" + +exit 0 diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png Binary files differnew file mode 100644 index 00000000..c9d8ab0d --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png Binary files differnew file mode 100644 index 00000000..8ca9347b --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini new file mode 100644 index 00000000..90d00617 --- /dev/null +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini @@ -0,0 +1,4 @@ +background-color=#ffffff +image-right=bwlehrpool-right.png +image-left=bwlehrpool-left.png + |