diff options
author | Manuel Bentele | 2021-08-31 10:44:58 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-08-31 10:44:58 +0200 |
commit | 5c7102715bfa4b8ecf4c324254b3125026ed1d79 (patch) | |
tree | d1c8dc2960fa3126e26849d8d34c662596ac723d | |
parent | [libvirt] Set max locked-in-memory space to unlimited for passthrough members (diff) | |
download | mltk-5c7102715bfa4b8ecf4c324254b3125026ed1d79.tar.gz mltk-5c7102715bfa4b8ecf4c324254b3125026ed1d79.tar.xz mltk-5c7102715bfa4b8ecf4c324254b3125026ed1d79.zip |
[slxlog] Do not print any commands if echo command is submitted
-rwxr-xr-x | core/modules/slxlog/data/opt/openslx/bin/slxlog | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/modules/slxlog/data/opt/openslx/bin/slxlog b/core/modules/slxlog/data/opt/openslx/bin/slxlog index f58934bc..fae6f5c8 100755 --- a/core/modules/slxlog/data/opt/openslx/bin/slxlog +++ b/core/modules/slxlog/data/opt/openslx/bin/slxlog @@ -10,19 +10,22 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin" +[ $# -eq 0 ] && exit 0 + . /opt/openslx/config [ -z "$SLX_REMOTE_LOG" ] && exit 3 USER=$(whoami) LOGCHECK="/tmp/remote_log_check-$USER" NOW=$(date +%s) +ECHO= DELFILE= SYNC= while [ $# -gt 0 ]; do case "$1" in -e|--echo) - echo "$@" + ECHO=yes ;; -d|--delete) DELFILE=yes @@ -37,7 +40,9 @@ while [ $# -gt 0 ]; do shift done -[ $# -eq 0 ] && exit 0 +if [ "${ECHO}" == "yes" ]; then + echo "$@" +fi TYPE="$1" |