How to run auto DHCP at boot? (solved)

Booting, installing, newbie
Post Reply
Message
Author
jaguarrh
Posts: 11
Joined: Sat 24 Mar 2007, 07:39
Location: thirroul NSW Australia

How to run auto DHCP at boot? (solved)

#1 Post by jaguarrh »

well, many congratulations to barry and everybody else involved in the development of puppy.

this is my first post so a little 'whoami' from me...

i've been messing around with different linux distro's for a while now, about 2 years actually. most of that time has been spent on damnsmalllinux,but i have also played with slackware, mepis, vector and a few others i can't remember. however, i would like to add, i still consider myself a beginner as it takes a while to get new skills thru my thick skull.

as i said, i cut my teeth, so to speak, on 'dsl' and i tried to install puppy on my old laptop a long time ago, without much success. as with most of my problems on linux, i think it was operator error, rather than buggy code. i gave up on working with puppy then as i didnt have enough skills to sort it out and damnsmall just worked at the time.

anyway, i've learned a bit about linux since and here i am with the current (214 - seamonkey) puppy (installed to hdd, not frugal or livecd). i had some trouble with the hdd install which i sorted out eventually (again, operator error) but now i think i am getting my head around the puppy file structure, etc.

the laptop i have my puppy in is as follows
compaq presario 1240
pII mmx 266mhz
96mb ram
3gb hdd (192mb swap, remainder single partition ext2)
netgear wg511v2 wireless pcmcia card
maxtor 200gb ext hdd (usb)

and now finally to my question (and believe me i have searched for an answer...)

i installed the driver for my wireless card with ndiswrapper, no problems. i can now use the connect wizard on the desktop and use the 'auto dhcp' feature to get the lappy an ip address from my router.

i have edited my /etc/rc.d/rc.local file to add the line

Code: Select all

modprobe ndiswrapper
which activates the card on bootup, but i cannot figure out what command i need to add afterwards to get the dhcp client to get an ip?

i tried to read the manpage for 'dhcpcd' to no avail, and the command i used on damnsmalllinux... 'pump -i wlan0' doesn't work in puppy.

can anyone point me in the right direction please? do i need to write a script? or should i be able to do it with a command in rc.local? or does the command need to go into .xinitrc?

anyway, respect to all the people who made puppy what it is today, and if you can help me out, all the better.

regards jag
Last edited by jaguarrh on Sun 25 Mar 2007, 00:33, edited 1 time in total.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#2 Post by HairyWill »

assuming your interface is called wlan0 the command you want is...

Code: Select all

dhcpcd -d wlan0
the -d isn't strictly neccessary but according to the man page it is recommended as it does some logging to syslog
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#3 Post by Pizzasgood »

I've also heard that having these lines before that one also helps:

Code: Select all

rm /etc/dhcpc/dhcpcd-wlan0.pid 2>/dev/null
rm /etc/dhcpc/dhcpcd-wlan0.cache 2>/dev/null
rm /etc/dhcpc/dhcpcd-wlan0.info 2>/dev/null
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

designengineer
Posts: 84
Joined: Wed 18 Oct 2006, 13:13

#4 Post by designengineer »

Rarsa posted a wireless setup program here:
http://www.murga-linux.com/puppy/viewto ... 2077455401

Use it to re-setup your card. One of the driver options is ndiswrapper, so you just use that, follow the directions, answer yes when it asks if you want to use this setup on next boot, and you are good to go. If your wireless network device is in your computer when you boot, it will load your wireless connection settings, get DHCP, then finish booting. When you see your desktop, you will be ready to go.
If this does not help, let me know.

jaguarrh
Posts: 11
Joined: Sat 24 Mar 2007, 07:39
Location: thirroul NSW Australia

#5 Post by jaguarrh »

excellent....

thanks for the prompt replies folks, much appreciated.

@ Hairy Will - i tried your response first as it was the most simple, and it worked. i thought i was on the right track with 'dhcpcd'. i added the line you posted to rc.local and now i have a fully functioning internet connection on boot. thanks

@ pizzasgood - i'm always up for some learning, could you explain what is the advantage of removing those files you listed? it doesnt seem to be necessary for me as my nic gets an ip with the dhcpcd command, but i am curious.

@ designengineer - thanks for the link, is that a different setup wizard than the network wizard that comes with puppy214 ? i will check it out. despite that, i am trying to get my noggin around more CLI so i am glad it was a simple line to be added to my rc.local

thanks all for your kind efforts.

jag

User avatar
bostonvaulter
Posts: 269
Joined: Wed 27 Sep 2006, 03:41

#6 Post by bostonvaulter »

jaguarrh wrote:excellent....

@ pizzasgood - i'm always up for some learning, could you explain what is the advantage of removing those files you listed? it doesnt seem to be necessary for me as my nic gets an ip with the dhcpcd command, but i am curious.
i'm not pizzasgood, but the reason you might want those other commands is because sometimes (especially after a bad shutdown) there is wrong info stored in those files, deleting them each time will make it will find everything new. you can just add those lines above the one you already have.

Also, do you guys think there should be an easier way to set up an automatic wireless connection? instead of using the same wizard.

Jason
[img]http://img.photobucket.com/albums/v212/BostonVaulter/avatar/puppybar.png[/img]

jaguarrh
Posts: 11
Joined: Sat 24 Mar 2007, 07:39
Location: thirroul NSW Australia

#7 Post by jaguarrh »

thanks.

:)

Post Reply