Location Profiles For Unix Laptops? 15
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?"
cardctl scheme (Score:3)
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?
a couple of suggestions (Score:1)
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.
Re:cardctl scheme (Score:1)
I have more than just 'work' and 'home'; I have clients' net configs (though simple DHCP often works for wired connections) and I have both wired and wireless at home.
I never noticed that RH6 broke anything in the pcmcia package because I always build a new kernel as soon as the laptop is up and running. But I've heard that they 'simplified' the network.opts file a little too much.
Re:a couple of suggestions (Score:1)
I think Divine [freshmeat.net] is a better concept. A configuration file tells it what servers exist on your various networks, and it then looks for the servers and sets the network configuration appropriately. But Divine doesn't know about DHCP yet.
Re:cardctl scheme (Score:4)
PCMCIA schemes are set up in /etc/pcmcia. Your network settings live in /etc/pcmcia/network.opts and are used by the script /etc/pcmcia/network.
RedHat replaces /etc/pcmcia/network with a script that uses RedHat's network configuration files in /etc/sysconfig/network-scripts. This allows you to use the GUI configuration tools to set up your network but prevents you from using schemes to handle your network configuration. On my RedHat laptop, I went diving in the pcmcia-cs source tree to find the 'normal' /etc/pcmcia/network so I could use schemes.
That said, I normally leave my laptop set to obtain network configuration information from DHCP. The DHCP servers on networks where I have a static IP have been told to reserve it for my laptop (well, technically, for my laptop's NIC), and when visiting other networks I don't have to futz around finding an IP. Whenever the computer is away from its home network, it uses MobileIP to bring up a tunnel back to its home agent. It looks more or less the same to other hosts regardless of its location, and I can suspend the laptop, drive to another location, and plug in to a completely diffirent network without disturbing my ssh sessions.
I just used bash scripts (Score:3)
#!/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.
Linuxconf (Score:1)
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.
Re:I just used bash scripts (Score:1)
my buddy wrote this program.... (Score:1)
gnetswitch [lost-angel.com]
Re:Runlevels (Score:2)
Re:cardctl scheme (Score:1)
OK, this is cool. But what if some of my 'schemes' need to enable WEP in different ways? Do the schemes extend into the wireless.opts file too?
Yes, they work in wireless.opts. The scheme is passed as the first argument of $ADDRESS. So home,*,*,00:02:2D:*) matches my MAC on my lucent card while using my home scheme. Scheme's can be appended as a kernel parameter, so I have different lilo entries for each scheme.
I never noticed that RH6 broke anything in the pcmcia package because I always build a new kernel as soon as the laptop is up and running. But I've heard that they 'simplified' the network.opts file a little too much.
To get the Lucent cards to work with 6.2 you have to download a newer version of the PCMCIA-cs package, build it and install it.
Use DHCP (Score:2)
Runlevels (Score:3)
_____________
Re:Runlevels (Score:2)
This is at least correct for the rpm based distros. I'm not sure about everyone else, but I think it's pretty consistent. I can't remember how to start a OL from 0. There should be a zero next to halt.
_____________
Laptop configuration (Score:1)
* 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.