Skip to content

Commit

Permalink
Merge pull request #634 from cgalibern/regression_feature_log_om_comm…
Browse files Browse the repository at this point in the history
…and_solaris

Fix command 'om' regression since 2.1-1676 'Add node command logger' on Solaris
  • Loading branch information
arnaudveron committed Oct 31, 2023
2 parents 6391b36 + a88b67a commit f83b6b0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/om
Expand Up @@ -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
Expand All @@ -133,13 +133,17 @@ main() {

log() {
OSVC_COMMAND_STRING="$0 $@"
if ! test -f $OSVC_COMMAND_LOG
if [ ! -f "$OSVC_COMMAND_LOG" ]
then
touch $OSVC_COMMAND_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
Expand Down

0 comments on commit f83b6b0

Please sign in to comment.