[pkg-wpa-devel] r994 - /wpasupplicant/trunk/debian/ifupdown/functions.sh
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sun Jan 6 04:56:23 UTC 2008
Author: kelmo-guest
Date: Sun Jan 6 04:56:23 2008
New Revision: 994
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=994
Log:
sanity check whether or not logfile can be written to before passing the -f option to daemon opts
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=994&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/ifupdown/functions.sh (original)
+++ wpasupplicant/trunk/debian/ifupdown/functions.sh Sun Jan 6 04:56:23 2008
@@ -229,10 +229,14 @@
if [ -n "$IF_WPA_LOGFILE" ]; then
# custom log file
- WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -f $IF_WPA_LOGFILE"
- wpa_msg verbose "log to $IF_WPA_LOGFILE"
- else
+ WPA_SUP_LOGFILE="$IF_WPA_LOGFILE"
+ wpa_msg verbose "logging to $IF_WPA_LOGFILE"
+ fi
+
+ if touch "$WPA_SUP_LOGFILE" 2>/dev/null; then
WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -f $WPA_SUP_LOGFILE"
+ else
+ wpa_msg stderr "unable to log output to $WPA_SUP_LOGFILE"
fi
wpa_msg verbose "$WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF"
More information about the Pkg-wpa-devel
mailing list