From dfb2b942f604e80b901654144146f3dc8dc0143d Mon Sep 17 00:00:00 2001 From: Cyril Galibern Date: Mon, 30 Oct 2023 12:49:12 +0100 Subject: [PATCH 1/2] [Solaris10] unexpected 'om command' stderr since feature: 'node command logger' regression introduced on 2.1-1677-gcdfb010d5: f72943135137a5666c5fdc9644688d58a75e40b2 --- bin/om | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/om b/bin/om index abbbe60d5..b164d9727 100755 --- a/bin/om +++ b/bin/om @@ -108,7 +108,7 @@ main() { exit fi - if ! test -z "$OSVC_COMMAND_LOG" + if [ ! -z "$OSVC_COMMAND_LOG" ] then log "$@" >/dev/null 2>&1 fi @@ -133,7 +133,7 @@ main() { log() { OSVC_COMMAND_STRING="$0 $@" - if ! test -f $OSVC_COMMAND_LOG + if [ ! -f "$OSVC_COMMAND_LOG" ] then touch $OSVC_COMMAND_LOG fi From a88b67a2a75082c20a9d0e417c9925175b75f9bf Mon Sep 17 00:00:00 2001 From: Cyril Galibern Date: Mon, 30 Oct 2023 13:44:33 +0100 Subject: [PATCH 2/2] [Solaris] drop 'node command logger' feature when gnu grep (ggrep) is absent 'node command logger' feature needs gnu grep, when absent drop feature. --- bin/om | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/om b/bin/om index b164d9727..978a37ca0 100755 --- a/bin/om +++ b/bin/om @@ -139,7 +139,11 @@ log() { fi if test -w $OSVC_COMMAND_LOG then - GREP=`which grep 2>/dev/null` + if [ "`uname`" = "SunOS" ] ; then + GREP=`which ggrep 2>/dev/null` + else + GREP=`which grep 2>/dev/null` + fi if test -x "$GREP" then echo "$OSVC_COMMAND_STRING" | $GREP -qE 'sec/|secret' && return