Pointers on running a startup script to ACTIVATE my dwl-520+

Place to discuss Fedora and/or Red Hat
Post Reply
dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Pointers on running a startup script to ACTIVATE my dwl-520+

Post by dickinsd » Tue Mar 01, 2005 6:16 am

Hi.

I have installed FC3 on my younger sisters computer, I know I can make it quite appealing to her when I actually get it working.

Har main (pretty much 99%) computer usage is Internet based, so I Need the wireless card to be working.

I have followed Craigs instructions:
http://www.houseofcraig.net/acx100_howto.php

And the card WORKED
Unfortunately, everytime I reboot the machine I need to activate the card again!

I need to do this with Root, so I can't even take the chance and just tell my sister what she needs to do, as she'll get nosey and I'll have a dead FC3 install.

Once you have the files at the top of Craigs How To you basically need to carry out these instructions:

Code: Select all

cd /home/danielle/Downloads/acx100-0.2.0pre8_plus_fixes_45
make 
make install
depmod
cd ..
tar Pjxf /home/danielle/Downloads/acx_firmware.tar.bz2
ls /usr/share/acx 
emacs /home/danielle/Downloads/acx100-0.2.0pre8_plus_fixes_45/scripts/start_net
cd acx100-0.2.0pre8_plus_fixes_45/scripts/  
./start_net 
ping -c 4 -I wlan0 192.168.2.11 
ping -c 4 -I wlan0 cnet.com 
ls -l /etc/rc.d/rc.local 
echo -e '\n#Bring acx100 device up\ncd /home/danielle/acx100-0.2.0pre8_plus_fixes_45/scripts\n./start_net\n' >> /etc/rc.d/rc.local
echo 'DEVICE=wlan0' > /etc/sysconfig/network-scripts/ifcfg-wlan0
kudzu
neat
Everything seems to be in the right place, because all I need to do to get it working is

Code: Select all

su -
cd /home/danielle/Downloads/acx100-0.2.0pre8_plus_fixes_45/scripts
./start_net
I get this on the screen:
[root@localhost scripts]# ./start_net
using wlan0.
Module successfully inserted.
Setting rate to 11M auto.
Setting channel 7.
Going to try to join or setup ESSID Wirez.
Setting mode to Managed.
Setting power LED to off.
Waiting for association...10 9 8 OK.
Attempting to use /sbin/dhclient for DHCP, this may take a moment...OK.
Interface has been set up successfully.
And the card is working, and I can browse the web, I am making this post from her machine now.

I thought adding these lines (as per Craigs instructions) would make the card auto load at each boot:
echo -e '\n#Bring acx100 device up\ncd /home/danielle/acx100-0.2.0pre8_plus_fixes_45/scripts\n./start_net\n' >> /etc/rc.d/rc.local
echo 'DEVICE=wlan0' > /etc/sysconfig/network-scripts/ifcfg-wlan0
But this does not appear to be the case.

I wonder does anyone know where I am going wrong OR can any one tell me how to make some kind of script that could su -, change to the /home/danielle/Downloads/acx100-0.2.0pre8_plus_fixes_45/scripts directory and activate the card = ./start_net at every boot, OR at every login?

Also, I have noticed that the /etc/hosts file gets truncated to 0kb everytime I activate the wireless card? this does not appear to cause any browsing problems, but does cause an error at every log in, so would it also be possible to add a script that gets root privaliges and adds the localhost info to the /etc/hosts file as well?

Thank you for any help with this

Dave
Last edited by dickinsd on Tue Mar 01, 2005 9:58 am, edited 1 time in total.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 01, 2005 9:57 am

Hi, an update;

I was told to add this:

Code: Select all

/home/danielle/Downloads/acx100-0.2.0pre8_plus_fixes_45/scripts
./start_net 
to /etc/rc.local

But this is already there, now I am not sure, but I guess the command

Code: Select all

echo -e '\n#Bring acx100 device up\ncd /home/danielle/acx100-0.2.0pre8_plus_fixes_45/scripts\n./start_net\n' >> /etc/rc.d/rc.local 

was responsible for adding this to the rc.local file.

Anyway, it doesn't work.

Is there a way of running a scirpt when a user logs in? I think this is where I need the script to be?

Thank you for any help

Dave

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 01, 2005 11:03 am

I notice you wipe out your /etc/sysconfig/network-script/ifcfg-wlan0 with just "DEVICE=wlan0". That config file is what tells Fedora to start your interface or not and you would be wiping that part out. It should have a line "ONBOOT=yes" in it if you want it to start automatically. If you want to manipulate this file with a graphical tool use the "system-config-network" and just edit your wlan0 interface click the "Activate device when computer starts" box.

I don't have any experience with your wireless card and I don't have to do any of that script stuff with mine. I am surprised that you have to do it with yours. All you should have to do is load the driver (which should happen automatically) and then put the proper settings in your ifcfg-wlan0 file (which can be done graphically as I said). But as I said, I have no experience with your device so I could be completely wrong. I use a Linksys WPC55AG pcmcia card that uses the MadWifi drivers and works great (I have two actually). I can look at it a little deeper this evening though.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 01, 2005 11:51 am

Thanks Void, I tried to add the 'ONBOOT=yes' command, but this appears to have made no difference.

The strangest thing is that the networc config screen does not actually appear to really recognise the device at all.

My other wireless problems stemmed from the fact that FC did not know what the card was, once I told it what it was, I could managed it from the Network config GUI, this card is completely different.

The card does work, its just it only works until you reboot.

Once the machine has rebooted, I log in to any account, and have no Network access. Open a terminal, su - change to the directory where the file is located and run the file ./start_net everything works fine, I can log in and out of accounts on the machine, they all work, until I reboot, when I have to do it again?

Thanks for any more help

Dave

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 01, 2005 12:03 pm

Edit your rc.local and on the "./start_net" line have it redirect to a log:

Code: Select all

./start_net > /tmp/start_net.log 2>&1
Reboot and then examine the contents of the /tmp/start_net.log file. Also, is there a copy of the start_net script I can look at somewhere?

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 01, 2005 12:22 pm

EDIT:

Ok well the log may be a good pointer - log output:
/etc/rc5.d/S99local: line 11: ./start_net: No such file or directory
Not sure what is going on with this, my rc.local looks like this:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#Bring acx100 device up
cd /home/danielle/acx100-0.2.0pre8_plus_fixes_45/scripts
./start_net > /tmp/start_net.log 2>&1
And the command is one of those commands that needs the ./ to work

Also I can send you the script or post it here - but it is pretty LARGE, so it would be a pretty big post.

Dave
Last edited by dickinsd on Tue Mar 01, 2005 12:32 pm, edited 1 time in total.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 01, 2005 12:28 pm

No, I'll just download it from wherever you got it.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 01, 2005 12:34 pm

Ok, Sorry I edited the post above your last post to give details of the log output.

the script is in this tar.bz2 file:

http://rhlx01.fht-esslingen.de/~andi/ac ... 45.tar.bz2

Dave

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 01, 2005 12:54 pm

Does the directory exist that you "cd" into (/home/danielle/acx100-0.2.0pre8_plus_fixes_45/scripts)? Look it over very carefully. Does the start_net script actually reside there? My guess is that the answer to one (or both) of those two questions is "no". Make the answer to both of those questions "yes" and I think you'll have better luck. It would also make more sense to actually have this installed under root's directory or /usr/local rather than under a user's home directory but it should still work.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 01, 2005 1:04 pm

:oops:

Ok so this means I am going to have to register under a new name at your site now, to try and forget about this 'incident'
This entire post all stems from a typo :oops:

Thank you Void. (for pointing out what the log file was telling me (and for suggesting the log file))

I forgot that I had created another folder to stuff things like this into. as such I was missing a directory from the cd command :oops:

I have looked at that file maybe 30 times today, and I missed it everytime. Is there any hope for me?

Thanks anyway

And sorry for the time wasting....

Dave :)

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 01, 2005 1:20 pm

Danger is my business. :)

Post Reply