LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-06-2006, 01:38 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Scripts for certain circumstances


I am using a laptop that uses DHCP for both my eth0 and wlan0 connections.

Sometimes, I only use the wlan0 connection, and other times the eth0 connection.

The problem is that when I do not have the eth0 connection physically plugged in, the bootup process stops for a LONG time (2-3 minutes)on trying to get a DHCP address on the eth0 connection that is not connected. I am currently disabling/enabling the lan card in BIOS before I boot, but that is a pain.

Setting eth0 to a static IP is not an option. (I connect to multple LANs, some of which I do not have ANY info for)

Also, more often than not, wlan0 does not get initialized, so I have to:
Code:
# ifconfig wlan0 up
# dhcpcd wlan0
to get a wireless connection.

I was wondering:
  1. Is there a way to get a interactive script written that asks if you want eth0 to get a dhcp address during each boot and to get wlan0 started, if needed? (Example: A: eth0 B: wlan0 C: No LAN)
  2. What would such a script look like?
  3. Where would be the best place to call the script from? (I'm assuming /etc/rc.d/rc.inet1 or /etc/rc.d/rc.inet2)
I am aware that I would have to enter in a choice during the boot for this to work. That does not bother me. It is better than what is going on at the moment.

Thank you for giving me ideas on this.

Running 10.2 (Not current!), kernel 2.6.15
Intel 10/100 ethernet
D-Link DWL-650 P1 wireless pcmcia card

Last edited by cwwilson721; 03-06-2006 at 01:45 PM.
 
Old 03-06-2006, 02:37 PM   #2
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 51
There's a fellow named Eric Hameleers aka 'alien'.
He has written some scripts that replace the standard rc.inet1 and rc.wireless.
He also wrote some others including ifplugd.sh

take a look here:
http://www.slackware.com/~alien/rc_scripts/
http://www.slackware.com/~alien/rc_scripts/ifcfg/

I think you will be pleasantly surprised...

tobyl
 
Old 03-06-2006, 02:45 PM   #3
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Original Poster
Rep: Reputation: 66
Looks like ifplugd.sh is EXACTLY what I was looking for. (At least for the eth0 part)

Thanks

Now, any ideas on what to do about wlan0? Can I put a 'wait 5' or something somewhere that will let dhcpcd find/use it? ifplugd.sh will work great IF wlan0 is already working.....
 
Old 03-06-2006, 03:59 PM   #4
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Original Poster
Rep: Reputation: 66
Nevermind....

Those scripts worked PERFECT!

Thanks, again
 
Old 03-06-2006, 04:38 PM   #5
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 51
you're welcome
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Scripts remev12 Programming 3 09-05-2005 01:23 AM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
scripts jmarsh Linux - Networking 1 03-13-2003 09:39 AM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration