diff options
| author | Simon Rettberg | 2016-01-21 10:49:29 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2016-01-21 10:49:29 +0100 |
| commit | 8d806ffba5dd22c433720c38a7e5111207ed5af5 (patch) | |
| tree | d9aaa00b2dd9f34ec2f2eb15662430ae1fa9535f /remote/modules/vmchooser2 | |
| parent | [busybox] Enable utmp feature so who is actually included (diff) | |
| download | tm-scripts-8d806ffba5dd22c433720c38a7e5111207ed5af5.tar.gz tm-scripts-8d806ffba5dd22c433720c38a7e5111207ed5af5.tar.xz tm-scripts-8d806ffba5dd22c433720c38a7e5111207ed5af5.zip | |
[vmchooser2] Add support for new location related parameters
Diffstat (limited to 'remote/modules/vmchooser2')
| -rwxr-xr-x | remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser index 4f30f447..a99207ff 100755 --- a/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser +++ b/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser @@ -16,7 +16,7 @@ else 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 ]; then +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 @@ -24,9 +24,13 @@ else TAB=2 fi -if [ -n "$SLX_VM_POOL_FILTER" ]; then - exec vmchooser.real "$@" --url "$URL" --pool "$SLX_VM_POOL_FILTER" --fullscreen --tab "$TAB" -else - exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" +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 + |
