summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2013-11-28 14:06:28 +0100
committerJonathan Bauer2013-11-28 14:06:28 +0100
commitfb3c175fa2d6d2480a5100c0268e5a2d4db4e00a (patch)
tree12cdf6b3440b50552c15d03cf2fd2d0016aff975 /remote
parent[rootfs-stage32] pimping up systemd-setup_slx_addons for slxlog (diff)
parent[rfs-stage32] add -e / --echo option to slxlog which makes it output the log ... (diff)
downloadtm-scripts-fb3c175fa2d6d2480a5100c0268e5a2d4db4e00a.tar.gz
tm-scripts-fb3c175fa2d6d2480a5100c0268e5a2d4db4e00a.tar.xz
tm-scripts-fb3c175fa2d6d2480a5100c0268e5a2d4db4e00a.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote')
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt4
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog10
2 files changed, 10 insertions, 4 deletions
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index 0030eda1..5e997647 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -491,7 +491,7 @@ fi
# Check if virtual machine container file exists
if ! [ -e "${vmpath}" ]; then
- slxlog "virt-missing-image" "VM image $vmpath not found!"
+ slxlog "virt-image-missing" "VM image $vmpath not found!"
writelog "Virtual machine image ${vmpath} not found!"
cleanexit 1
fi
@@ -501,7 +501,7 @@ writelog "Used diskfile: $vm_diskfile"
# Get all virtual machine specific stuff from the respective include file
if [ ! -e "$VMCHOOSER_DIR/$xmlvirt/run-virt.include" ] ; then
# TODO: Tell user
- slxlog "virt-plugin-missing" "Could not find run-virt.include for $xmlvirt"
+ slxlog "virt-plugin-missing" "Could not find run-virt.include for $xmlvirt ($VMCHOOSER_DIR/$xmlvirt/run-virt.include)"
writelog "Failed because of missing ${xmlvirt} plugin."
cleanexit 1
fi
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog
index 8b8780f1..afe72a2d 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog
@@ -1,10 +1,11 @@
-#!/opt/openslx/bin/ash
+#!/bin/sh
##################
# Remote logging #
##################
#
-# Usage: slxlog "logtype" "Human readable string" ["file name which's contents should be sent too"]
+# Usage: slxlog [-e | --echo] "logtype" "Human readable string" ["file name which's contents should be sent too"]
+# -e or --echo will echo message to stdout too
#
. /opt/openslx/config
@@ -13,6 +14,11 @@
LOGCHECK="/tmp/remote_log_check"
NOW=$(date +%s)
+if [ "x$1" = "x-e" -o "x$1" = "x--echo" ]; then
+ shift
+ echo "$@"
+fi
+
[ $# -eq 0 ] && exit 0
TYPE="$1"