Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (f478273fda9efb599fac66eb6a3810217cb29c15)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Juuso Alasuutari <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (f478273fda9efb599fac66eb6a3810217cb29c15)
  • Date: Wed, 31 Jan 2007 17:15:11 -0600

GIT changes to master grimoire by Juuso Alasuutari <iuso AT sourcemage.org>:

net/wpa_supplicant/HISTORY | 4 +++
net/wpa_supplicant/init.d/wpa_supplicant | 41
+++++++++++++++++--------------
2 files changed, 27 insertions(+), 18 deletions(-)

New commits:
commit f478273fda9efb599fac66eb6a3810217cb29c15
Author: Juuso Alasuutari <iuso AT sourcemage.org>
Commit: Juuso Alasuutari <iuso AT sourcemage.org>

wpa_supplicant: enhanced and speeded up init script

diff --git a/net/wpa_supplicant/HISTORY b/net/wpa_supplicant/HISTORY
index d2fdc1a..c29231e 100644
--- a/net/wpa_supplicant/HISTORY
+++ b/net/wpa_supplicant/HISTORY
@@ -1,3 +1,7 @@
+2007-02-01 Juuso Alasuutari <iuso AT sourcemage.org>
+ * init.d/wpa_supplicant: Added check for wireless extensions,
+ removed redundant iwconfig forks.
+
2007-01-17 Juuso Alasuutari <iuso AT sourcemage.org>
* INSTALL: Changed example config install location to
/usr/share/doc/wpa_supplicant.
diff --git a/net/wpa_supplicant/init.d/wpa_supplicant
b/net/wpa_supplicant/init.d/wpa_supplicant
index 90dcd79..b8e75bb 100755
--- a/net/wpa_supplicant/init.d/wpa_supplicant
+++ b/net/wpa_supplicant/init.d/wpa_supplicant
@@ -14,26 +14,31 @@ DROPFILE=/var/tmp/wpa_supplicant.drop
start()
{
required_executable /usr/sbin/iwconfig
+ local IWCONFIG=`builtin echo $(/usr/sbin/iwconfig $INTERFACE 2>&1)`

- if /usr/sbin/iwconfig 2>&1 | grep -q "^$INTERFACE "; then
- if [[ $(/usr/sbin/iwconfig 2>/dev/null | grep "$INTERFACE
*unassociated") ]]
- then
- echo Starting wpa_supplicant...
- $PROGRAM -B -i $INTERFACE -D $DRIVER -c $CONFIG -g $CONTROL
- evaluate_retval
- /bin/echo "INTERFACE=\"$INTERFACE\"" 2>/dev/null > $DROPFILE
- elif [[ $(/usr/sbin/iwconfig 2>/dev/null | grep "$INTERFACE *radio off")
]]
- then
- echo $INTERFACE: radio off
- (exit 1)
- evaluate_retval
- else
- echo $INTERFACE: already connected
- (exit 1)
- evaluate_retval
- fi
+ if [[ "$IWCONFIG" == $INTERFACE\ unassociated* ]]
+ then
+ echo Starting wpa_supplicant...
+ $PROGRAM -B -i $INTERFACE -D $DRIVER -c $CONFIG -g $CONTROL
+ evaluate_retval
+ /bin/echo "INTERFACE=\"$INTERFACE\"" 2>/dev/null > $DROPFILE
+ elif [[ "$IWCONFIG" == $INTERFACE\ radio\ off* ]]
+ then
+ echo $INTERFACE: radio off
+ (exit 1)
+ evaluate_retval
+ elif [[ "$IWCONFIG" == $INTERFACE\ no\ wireless* ]]
+ then
+ echo $INTERFACE: no wireless extensions
+ (exit 1)
+ evaluate_retval
+ elif [[ "$IWCONFIG" == $INTERFACE\ No\ such* ]]
+ then
+ echo $INTERFACE: no such device
+ (exit 1)
+ evaluate_retval
else
- echo $INTERFACE: not found
+ echo $INTERFACE: already connected
(exit 1)
evaluate_retval
fi



  • [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (f478273fda9efb599fac66eb6a3810217cb29c15), Juuso Alasuutari, 01/31/2007

Archive powered by MHonArc 2.6.24.

Top of Page