 |
Puppy Linux Discussion Forum Puppy home page: puppylinux.com
|
The time now is Fri 20 Nov 2009, 22:07
All times are UTC - 4 |
| Author |
Message |
2lss
Joined: 20 Sep 2009 Posts: 13
|
Posted: Tue 03 Nov 2009, 13:21 Post subject:
Problems with dhcpcd in wireless connect script (SOLVED) |
|
I pieced this together from different scripts I found on this forum
| Code: | #! /bin/bash
rm /var/run/wpa_supplicant/*
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant2.conf
sleep 5
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
dhcpcd -t 30 -h puppypc -d ath0 |
I am trying to using this script to connect to the wpa2 enterprise at my university using wpa_supplicant.
If I run wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant2.conf
in the terminal and then run dhcpcd -t 30 -h puppypc -d ath0 in a separate terminal I can connect with no problem.
If I run the script, My puppy wireless widgit shows I am connected to the network but apparently dhcpcd is not working. If I try to load a web page seamonkey just times out. To get it to work I use dhcpcd in the puppy connection wizard and everything works ok.
Does anyone know why dhcpcd works in a terminal but not in my script? All of the networking scrips I found on this forum look similar, and I am stumped.
Last edited by 2lss on Fri 06 Nov 2009, 12:35; edited 1 time in total
|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 3550 Location: Australia
|
Posted: Tue 03 Nov 2009, 21:39 Post subject:
|
|
As you will see in the "How to configure wifi from the commandline" HOWTO -
http://www.murga-linux.com/puppy/viewtopic.php?t=22469
there are two different syntax variations of the dhcpcd command.
Your script uses the conventional syntax -
| Code: | | dhcpcd -t 30 -h puppypc -d ath0 |
but you may need this instead -
| Code: | | dhcpcd -I '' -t 30 -h puppypc -d ath0 |
That's hyphen, capital i, space, apostrophe, apostrophe (not quotation marks).
|
|
Back to top
|
|
 |
2lss
Joined: 20 Sep 2009 Posts: 13
|
Posted: Fri 06 Nov 2009, 12:35 Post subject:
|
|
Ok, I got it working
tempestuous: Thanks for the info, but I still was getting the same results.
I just added a -B to the end of wpa_supplicant and now it seems to be working fine
|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 3550 Location: Australia
|
Posted: Fri 06 Nov 2009, 22:49 Post subject:
|
|
| 2lss wrote: | | I just added a -B to the end of wpa_supplicant and now it seems to be working fine |
Ah yes, that's because without the "B" your script will end at the wpa_supplicant command.
The "B" forces wpa_supplicant to run in the background, and the script then continues to the end.
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|
[ Time: 9.4938s ][ Queries: 9 (9.1213s) ][ Debug on ] |