Location Profiles For Unix Laptops?
Cyron Green asks: "I travel quite a bit with my laptop (it keeps me company). I hate having to change my NIC settings everytime I stop somewhere or I go from work to home. Is there any type of Location Managment software out there for Linux or FreeBSD?"
to switch to your home or work network settings respectively. However, at some time around Red Hat 6.x, this stopped working. By then, though, I wasn't using the laptop enough for me to bother to find out why... Can anyone shed any light on this?
"The invisible and the non-existent look very much alike." -- Delos B. McKown
a couple of solutions are suggested in the laptop how-to :# ss 10.2
. ht ml
http://www.linux.com/howto/Laptop-HOWTO-10.html
namely netdev and devine
http://www.uni-bielefeld.de/~portgym/net/netenv
http://www.fefe.de/devine
You might also want to check the pcmcia how-to:
http://www.linux.com/howto/PCMCIA-HOWTO.html
which describes how to setup scheme support....
hope this helps.
That was driving me nuts too, so I installed sudo, gave my user account sudo rights to ifconfig, route, and pump. Then my scripts looks similar to:
/etc/resolv.conf to which one you ned in the bash script. I dont have that problem as I just use my ISP's named from wherever I am. A little slower, but I dont have to change anything!
#!/bin/bash
sudo ifconfig eth0 192.168.0.50
sudo route add default gw 192.168.0.1
or...
#!/bin/bash
sudo pump -i eth0
Now, if you need to change your resolv.conf, maintain several and chown them to your user account. That way you can have resolv.conf.work, resolv.conf.home, resolv.conf.client3 and hell, you could symlink
After I made all my scripts, I put a menu in my KDE bar that had links to all my scripts. I bring the laptop out of suspend, click the bar, choose where I am, and poof.
What about Linuxconf?
I know it has profiles called Work and Home, though I've never dared to try it out I would assume it has something to do with it.
maybe its what you're looking for.
gnetswitch
Um, maybe init 3 and init 4? Or do you mean switching between a profile and off?
This space for rent. Call 1-800-STEAK4U
Why not do the settings via DHCP? I run my laptop between home and work all the time, plus the wireless card. Using static DHCP, I always get the same IP address, name, and other settings.
I've heard of some people setting up init scripts on laptops to use the (generally) unused runlevel 4. Usually I've heard about this in terms of enabling some power management features, but I don't see why you couldn't change the network startup scripts while you were at it. Once you'd done that it would just be a matter of typing init 4 or init 5 to switch between two different profiles.
_____________
I don't want free as in beer. I just want free beer.
I am using my laptop
/etc/hosts to a different IP for every configuration (a small script in /etc/setmailhost does that).
/etc/pcmcia/wireless.opts), because I currently only use it at home. It could, of course, use DHCP.
/etc/ppp/ip-up.d that change settings based on the provider.
* At home with a wireless card
* At work
* Visiting other offices
* Visiting clients
* On the road (from hotels, etc)
I never reboot the laptop, only suspend/restore (it occasionally crashes, though, about once a month, but usually for some unrelated reason).
I run Debian (woody/2.2.17), and among the software I have installed is a dhcp client, divine, dnrd, wwwoffle, exim, imap, fetchmail, ntpdate, and some more.
There's a bunch of scripts that reconfigure the above packages as needed.
All my browsers (including apt-get) are pointed at the wwwoffle proxy.
/etc/resolv.conf points at localhost, and dnrd is restarted with new options on every connection. dnrd quits on suspend.
I download e-mail with fetchmail to my local imap and use it from whatever mail client pleases me. fetchmail starts in daemon mode when there's an ethernet connection, on PPP it just runs once. It quits on suspend.
I send all e-mail through the local forwarding exim. Exim is configured to send everything on to mailhost, and mailhost is remapped in
My wireless card is configured for only one IP address (in
The ethernet card (pcmcia) is used both at work and elsewhere. Some of these places have DHCP, some do not. I use dhcpcd and divine (although divine doesn't work well with dhcp). Each divine config has a script attached to it that changes the configuration for the above daemons. Where there is no DHCP, I have to run the divine script by hand.
For PPP, there are similar scripts in
Samba is restarted on every restore and pcmcia network card insert, because it needs to rebind itself to the new interfaces. I haven't bothered changing the workgroup from the scripts yet, but that is something I plan to do.
The situation that I haven't figured out very well yet is when there are several interfaces active (2 ethernet cards in at the same time, or ethernet and PPP running simultaneously). For me that so rarely happens that I don't want to invest time in figuring out a good solution.
If you wish to know more details, drop me a mail at eero.raun@cyberdude.com.
-eero