[pkg-wpa-devel] r1004 - /wpasupplicant/trunk/debian/ifupdown/functions.sh

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sun Jan 6 11:21:11 UTC 2008


Author: kelmo-guest
Date: Sun Jan  6 11:21:11 2008
New Revision: 1004

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1004
Log:
do not use touch to determine if logfile can be written, just use shell builtin to determine if target log directory exists

Modified:
    wpasupplicant/trunk/debian/ifupdown/functions.sh

Modified: wpasupplicant/trunk/debian/ifupdown/functions.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/ifupdown/functions.sh?rev=1004&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/ifupdown/functions.sh (original)
+++ wpasupplicant/trunk/debian/ifupdown/functions.sh Sun Jan  6 11:21:11 2008
@@ -239,7 +239,7 @@
 			wpa_msg verbose "logging to $IF_WPA_LOGFILE"
 		fi
 
-		if touch "$WPA_SUP_LOGFILE" 2>/dev/null; then
+		if [ -d "${WPA_SUP_LOGFILE%/*}" ]; then
 			WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -f $WPA_SUP_LOGFILE"
 		else
 			wpa_msg stderr "unable to log output to $WPA_SUP_LOGFILE"
@@ -805,7 +805,7 @@
 # Log actions to file, test to see if it is writeable first
 #
 wpa_log_init () {
-	if touch "$WPA_CLI_LOGFILE" 2>/dev/null; then
+	if [ -d "${WPA_CLI_LOGFILE%/*}" ]; then
 		exec >> "$WPA_CLI_LOGFILE" 2>&1
 	fi
 }




More information about the Pkg-wpa-devel mailing list