From e5d8a9f579fe44c052a32f85b33418d28f38dfd2 Mon Sep 17 00:00:00 2001 From: Alter Step Date: Mon, 28 Apr 2014 18:59:30 -0700 Subject: [PATCH] Do not use local variables --- .../DNSCrypt/extra/usr/scripts/common.inc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc index 3d60c84..9fe511e 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc @@ -60,9 +60,7 @@ init_interfaces() { logger_debug() { [ -f "$DEBUG_ENABLED_FILE" ] || return - local msg="$1" - local now="$(date)" - lockfile -1 -r 1 "$DEBUG_LOG_FILE_LOCK" - echo "$now - $msg" >> "$DEBUG_LOG_FILE" - rm -f "$DEBUG_LOG_FILE_LOCK" + lockfile -1 -r 1 "$DEBUG_LOG_FILE_LOCK" > /dev/null 2>&1 + echo "$(date) - $1" >> "$DEBUG_LOG_FILE" + rm -f "$DEBUG_LOG_FILE_LOCK" 2> /dev/null }