scripts: Simplify script_log() to just look at CTDB_SYSLOG variable
authorMartin Schwenke <martin@meltin.net>
Tue, 15 Oct 2013 00:57:28 +0000 (11:57 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 22 Oct 2013 03:34:04 +0000 (14:34 +1100)
The old logic was actually wrong.  If CTDB_LOGFILE is unset then a
default is used, not syslog.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions

index 878174bc546b07a8d8157e645a2dd0fc1ddc7e19..7e25d2743d7749755bc06c11f2bd498ddefb142c 100755 (executable)
@@ -88,12 +88,7 @@ script_log ()
 {
     _tag="$1" ; shift
 
-    _using_syslog=false
-    if [ "$CTDB_SYSLOG" = "yes" -o -z "$CTDB_LOGFILE" ] ; then
-       _using_syslog=true
-    fi
-
-    if $_using_syslog ; then
+    if [ "$CTDB_SYSLOG" = "yes" ] ; then
        logger -t "ctdbd: ${_tag}" $*
     else
        {