summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32/data/opt/openslx/bin
diff options
context:
space:
mode:
authorSimon Rettberg2013-11-28 14:06:27 +0100
committerSimon Rettberg2013-11-28 14:06:27 +0100
commite23cd503a2177256b97d95315cf3aae42c3146bb (patch)
tree35783cfaf04597cd3c2236c2766f0e61be759483 /remote/rootfs/rootfs-stage32/data/opt/openslx/bin
parentMerge branch 'master' of dnbd3:openslx-ng/tm-scripts (diff)
downloadtm-scripts-e23cd503a2177256b97d95315cf3aae42c3146bb.tar.gz
tm-scripts-e23cd503a2177256b97d95315cf3aae42c3146bb.tar.xz
tm-scripts-e23cd503a2177256b97d95315cf3aae42c3146bb.zip
[rfs-stage32] add -e / --echo option to slxlog which makes it output the log message to stdout too
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data/opt/openslx/bin')
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/bin/slxlog10
1 files changed, 8 insertions, 2 deletions
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"