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

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Wed Jul 2 08:30:57 UTC 2008


Author: kelmo-guest
Date: Wed Jul  2 08:30:57 2008
New Revision: 1206

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1206
Log:
Misc cleanups of ifupdown glue, remove wpa_cli daemon specific runtime files in kill_wpa_cli()

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=1206&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/ifupdown/functions.sh (original)
+++ wpasupplicant/trunk/debian/ifupdown/functions.sh Wed Jul  2 08:30:57 2008
@@ -429,6 +429,14 @@
 	if [ -f "$WPA_CLI_OMIT_PIDFILE" ]; then
 		rm -f "$WPA_CLI_OMIT_PIDFILE"
 	fi
+
+	if [ -f "$WPA_CLI_TIMESTAMP" ]; then
+		rm -f "$WPA_CLI_TIMESTAMP"
+	fi
+
+	if [ -L "$WPA_CLI_IFUPDOWN" ]; then
+		rm -f "$WPA_CLI_IFUPDOWN"
+	fi
 }
 
 #####################################################################
@@ -850,17 +858,18 @@
 
 #####################################################################
 ## wpa_action basic logging
-# Log actions to file, test to see if it is writeable first
+# Log actions to file
 #
 wpa_log_init () {
-	if [ -d "${WPA_CLI_LOGFILE%/*}" ]; then
-		exec >> "$WPA_CLI_LOGFILE" 2>&1
-	fi
+	exec >> "$WPA_CLI_LOGFILE" 2>&1
 }
 
 # log timestamp and wpa_action arguments
 wpa_log_action () {
-	echo "########## $(date +"%H:%M:%S  %Y-%m-%d") ##########"
+	local DATE
+	
+	DATE=$(date +"%H:%M:%S  %Y-%m-%d")
+	echo "########## $DATE ##########"
 	echo "IFACE=$WPA_IFACE ACTION=$WPA_ACTION"
 }
 
@@ -879,7 +888,10 @@
 # potential to cause system instability.
 #
 wpa_hysteresis_event () {
-	echo "$(date +%s)" > "$WPA_CLI_TIMESTAMP"
+	local TIME
+
+	TIME=$(date +%s)
+	echo "$TIME" > "$WPA_CLI_TIMESTAMP"
 }
 
 wpa_hysteresis_check () {




More information about the Pkg-wpa-devel mailing list