[pkg-wpa-devel] r958 - in /wpasupplicant/trunk/debian: changelog ifupdown/functions.sh rules wpasupplicant.wpa_supplicant.logrotate

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Thu Dec 27 13:58:28 UTC 2007


Author: kelmo-guest
Date: Thu Dec 27 13:58:27 2007
New Revision: 958

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=958
Log:
* Log wpa_supplicant output to /var/log/wpa_supplicant.$IFACE.log per
  default when using ifupdown to manage wpa_supplicant. wpa_supplicant
  supports logging somewhere via -f cli option. (Closes: #317180)
* Add support for managing debug level of wpa_supplicant via thye ifupdown
  scripts. wpa-debug-level n (for n in 1 2 3).

Added:
    wpasupplicant/trunk/debian/wpasupplicant.wpa_supplicant.logrotate
Modified:
    wpasupplicant/trunk/debian/changelog
    wpasupplicant/trunk/debian/ifupdown/functions.sh
    wpasupplicant/trunk/debian/rules

Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=958&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Thu Dec 27 13:58:27 2007
@@ -49,8 +49,13 @@
   * Add debian/patches/30_id_str_wpa_gui_qt3.patch to enhance the QT3 wpa_gui
     with a Network ID field to represent the id_str field when adding a
     network block.
-
- -- Kel Modderman <kel at otaku42.de>  Thu, 27 Dec 2007 22:19:50 +1000
+  * Log wpa_supplicant output to /var/log/wpa_supplicant.$IFACE.log per
+    default when using ifupdown to manage wpa_supplicant. wpa_supplicant
+    supports logging somewhere via -f cli option. (Closes: #317180)
+  * Add support for managing debug level of wpa_supplicant via thye ifupdown
+    scripts. wpa-debug-level n (for n in 1 2 3).
+
+ -- Kel Modderman <kel at otaku42.de>  Thu, 27 Dec 2007 23:47:52 +1000
 
 wpasupplicant (0.6.1~git20071119-1) unstable; urgency=low
 

Modified: wpasupplicant/trunk/debian/ifupdown/functions.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/ifupdown/functions.sh?rev=958&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/ifupdown/functions.sh (original)
+++ wpasupplicant/trunk/debian/ifupdown/functions.sh Thu Dec 27 13:58:27 2007
@@ -21,14 +21,15 @@
 # wpa_supplicant variables
 WPA_SUP_BIN="/sbin/wpa_supplicant"
 WPA_SUP_PNAME="wpa_supplicant"
-WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$WPA_IFACE.pid"
+WPA_SUP_PIDFILE="/var/run/wpa_supplicant.${WPA_IFACE}.pid"
+WPA_SUP_LOGFILE="/var/log/wpa_supplicant.${WPA_IFACE}.log"
 
 # wpa_cli variables
 WPA_CLI_BIN="/sbin/wpa_cli"
 WPA_CLI_PNAME="wpa_cli"
-WPA_CLI_PIDFILE="/var/run/wpa_action.$WPA_IFACE.pid"
+WPA_CLI_PIDFILE="/var/run/wpa_action.${WPA_IFACE}.pid"
 WPA_CLI_LOGFILE="/var/log/wpa_action.log"
-WPA_CLI_TIMESTAMP="/var/run/wpa_action.$WPA_IFACE.timestamp"
+WPA_CLI_TIMESTAMP="/var/run/wpa_action.${WPA_IFACE}.timestamp"
 
 # default ctrl_interface socket directory
 if [ -z "$WPA_CTRL_DIR" ]; then
@@ -161,14 +162,7 @@
 #
 init_wpa_supplicant () {
 	if [ -n "$WPA_SUP_CONF" ]; then
-		# wpa-action was removed, point to wpa-roam
-		if [ -n "$IF_WPA_ACTION" ]; then
-			wpa_msg stderr "wpa-action support has been removed"
-			wpa_msg stderr "refer to /usr/share/doc/wpasupplicant/README.modes.gz"
-			return 1
-		fi
-
-		local WPA_SUP_DRIVER WPA_SUP_OPTIONS
+		local WPA_SUP_OPTIONS
 
 		if [ -n "$WPA_ACTION_SCRIPT" ]; then
 			if [ -x "$WPA_ACTION_SCRIPT" ]; then
@@ -188,20 +182,42 @@
 		fi
 
 		if [ -n "$IF_WPA_DRIVER" ]; then
-			WPA_SUP_DRIVER="$IF_WPA_DRIVER"
-			wpa_msg verbose "wpa-driver $WPA_SUP_DRIVER"
+			WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -D $IF_WPA_DRIVER"
+			wpa_msg verbose "wpa-driver $IF_WPA_DRIVER"
 		else
-			WPA_SUP_DRIVER="wext"
-			wpa_msg verbose "using default driver type: wpa-driver $WPA_SUP_DRIVER"
+			WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -D wext"
+			wpa_msg verbose "using default driver type: wpa-driver wext"
+		fi
+
+		if [ -n "$IF_WPA_DEBUG_LEVEL" ]; then
+			case "$IF_WPA_DEBUG_LEVEL" in
+				3)
+					WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -ddd"
+					;;
+				2)
+					WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -dd"
+					;;
+				*)
+					WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -d"
+					;;
+			esac
+		fi
+
+		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_OPTIONS="$WPA_SUP_OPTIONS -f $WPA_SUP_LOGFILE"
 		fi
 
 		wpa_msg verbose "$WPA_SUP_BIN $WPA_SUP_OPTIONS -D $WPA_SUP_DRIVER $WPA_SUP_CONF"
 			
 		start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \
 			--name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
-			-- $WPA_SUP_OPTIONS -D $WPA_SUP_DRIVER $WPA_SUP_CONF
-
-		if [ "$?" != "0" ]; then
+			-- $WPA_SUP_OPTIONS $WPA_SUP_CONF
+
+		if [ "$?" -ne 0 ]; then
 			wpa_msg stderr "$WPA_SUP_BIN daemon failed to start"
 			return 1
 		fi
@@ -292,7 +308,7 @@
 			--name $WPA_CLI_PNAME --startas $WPA_CLI_BIN --pidfile $WPA_CLI_PIDFILE \
 			-- $WPA_CLI_OPTIONS -p $WPA_CTRL_DIR -a $WPA_ACTION_SCRIPT
 
-		if [ "$?" != "0" ]; then
+		if [ "$?" -ne 0 ]; then
 			wpa_msg stderr "$WPA_CLI_BIN daemon failed to start"
 			return 1
 		fi

Modified: wpasupplicant/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/rules?rev=958&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/rules (original)
+++ wpasupplicant/trunk/debian/rules Thu Dec 27 13:58:27 2007
@@ -97,6 +97,7 @@
 	dh_installexamples
 	dh_install
 	dh_installlogrotate --package=wpasupplicant --name=wpa_action
+	dh_installlogrotate --package=wpasupplicant --name=wpa_supplicant
 	dh_installinit --package=wpasupplicant --name=wpa-ifupdown --no-start -- start 15 0 6 .
 	dh_installman
 	dh_link

Added: wpasupplicant/trunk/debian/wpasupplicant.wpa_supplicant.logrotate
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/wpasupplicant.wpa_supplicant.logrotate?rev=958&op=file
==============================================================================
--- wpasupplicant/trunk/debian/wpasupplicant.wpa_supplicant.logrotate (added)
+++ wpasupplicant/trunk/debian/wpasupplicant.wpa_supplicant.logrotate Thu Dec 27 13:58:27 2007
@@ -1,0 +1,7 @@
+/var/log/wpa_supplicant.*.log {
+	rotate 5
+	daily
+	compress
+	copytruncate
+	missingok
+}




More information about the Pkg-wpa-devel mailing list