SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How about greping the output of wpa_supplicant for the line which says that it succesfully associated to the network, then write "OK" into a tempfile ... and then continuously probe if the file already has "OK" in it ... if yes then run dhcpcd?
#!/bin/bash
wpa_supplicant |grep "a_string" |sed "s/^.*a_string.*$/OK/" >/tmp/a_temp_file &
while true; do
if [ `cat /tmp/a_temp_file` = "OK" ]; then
dhcpcd eth2;
break;
fi
done
I haven't tried this, possibly some mistakes (I'm not an bash expert and don't have wpa_supplicant on this machine), you also have to change the obvious bits of code accordingly.
I think it should work, despite being an ugly hack...
#!/bin/bash
wpa_supplicant |grep "a_string" |sed "s/^.*a_string.*$/OK/" >/tmp/a_temp_file &
while true; do
if [ `cat /tmp/a_temp_file` = "OK" ]; then
dhcpcd eth2;
break;
fi
done
I haven't tried this, possibly some mistakes (I'm not an bash expert and don't have wpa_supplicant on this machine), you also have to change the obvious bits of code accordingly.
I think it should work, despite being an ugly hack...
Hmm... looks like it would work. I've decided to make my life less complicated and use the wpa_gui. It seems to be working well for now. Thanks for your suggestion though.
If this helps anybody:
At first, I didn't realize that you had to give permissions for users to be able to use wpa_gui. I thought that wpa_gui just wasn't working for me.
Once I modified the /etc/wpa_supplicant.conf file to allow users in the "net" group to have access, then all users that I have put in "net" are able to use wpa_gui.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.