summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-10-04 20:31:45 +0200
committerGitHub <noreply@github.com>2020-10-04 20:31:45 +0200
commita60663132d9d067a7a1b5cbc95ab8ddf34877bb0 (patch)
tree192c6f2b02fab310b6fcc628861cf9a8ac642453
parent7b73a065f598ef0ddc7a27adde6e401757e6254c (diff)
downloadvyatta-op-a60663132d9d067a7a1b5cbc95ab8ddf34877bb0.tar.gz
vyatta-op-a60663132d9d067a7a1b5cbc95ab8ddf34877bb0.zip
monitor: nat: T2951: fix warning by adjusting to latest CLI version
-rw-r--r--scripts/vyatta-monitor-check-rule-log5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/vyatta-monitor-check-rule-log b/scripts/vyatta-monitor-check-rule-log
index bc49491..5466edc 100644
--- a/scripts/vyatta-monitor-check-rule-log
+++ b/scripts/vyatta-monitor-check-rule-log
@@ -1,12 +1,9 @@
#!/bin/sh
-API=/bin/cli-shell-api
RULE_PATH=$1
RULE_NUM=$2
-LOG=`cli-shell-api returnEffectiveValue $RULE_PATH rule $RULE_NUM log`
-
-if [ "$LOG" != "enable" ]; then
+if ! cli-shell-api existsActive $RULE_PATH rule $RULE_NUM log; then
echo "Warning: logging is not enabled for rule $RULE_NUM"
echo "For proper monitor operation enable logging before issuing this command:"
echo "set $RULE_PATH rule $RULE_NUM log enable"