View previous topic :: View next topic |
Author |
Message |
Felig Apprentice
Joined: 22 Jun 2004 Posts: 180
|
Posted: Fri Nov 05, 2004 6:45 am Post subject: Laptop dual boot DHCP or static IP |
|
|
I'd like to set up my laptop networking so when at home, it can be a part of my home network with a static IP address, or I can boot it to use DHCP and a different firewall setup.
I think some kind of boot command line option would do the trick, but I don't know how to use it. It shows up in /proc/cmdline, and /sbin/functions.sh looks in there for a few parameters.
Can someone provide pointers on how to do this? I figure perhaps modify /etc/init.d/net.eth0 to read a different /etc/conf.d file, but that seems rather crude.
Also, how much of the networking setup would I need to change for DHCP vs static IP? I notice DHCP writes its own resolv.conf. What about outgoing mail? I run mini-qmail which forwards everything to a central machine when at home. DHCP would have to change a symlink in /usr/bin, but that's easy enough/ Are there other things which I woudl have to change depending on which way the network is configured?
How about wireless? Is this just DHCP, or would I need yet another command line option? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Nov 05, 2004 9:03 am Post subject: Re: Laptop dual boot DHCP or static IP |
|
|
Felig wrote: | How about wireless? Is this just DHCP, or would I need yet another command line option? |
With wireless you can configure different network settings per ESSID. This means you could have DHCP for work and static for home and it would switch automatically.
For wired interfaces, look at the quickswitch package in portage |
|
Back to top |
|
|
Felig Apprentice
Joined: 22 Jun 2004 Posts: 180
|
Posted: Fri Nov 05, 2004 3:14 pm Post subject: Thanks -- pretty much SOLVED |
|
|
Quickswitch looks like just the ticket, it is installing as I type. I also discovered that yes indeed, /proc/cmdline provides the boot params, and the /etc/conf.d/* files are just shell scripts, I can add any shell scripting I want in there, and /proc/cmdline is set by then.
Still some experimenting involved, that's the fun part. |
|
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
|
|