-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I have a laptop and I'm working and connecting at three different
> places: at home with a ADSL connection, at workplace #1 through a DHCP
> server and at workplace #2 through a fixed IP address. Is it possible to
> create different connection scripts to automate the change from one
> connection to another ?


I got recommened (a while ago) to create a number of virtual runlevels. I

create 3 directories in /etc/runlevels as home, work1, work2 or whatever name 
takes your fancy.

do a 
#rc-update add dhcpd work1
#rc-update add pptp home
etc. I think you get the idea.

use the command line with
#rc work1 
to start the work1 stuff and your done.

If you use a script like /etc/init.d/net.eth0 more that once you probably need 
to copy it can many locations and make each one a bit different.

Going off Williams suggestion you could alter /sbin/rc to read the 
/proc/cmdline and run the appropriate runlevel (work1,home,work2 etc.).

I haven't done this but its pretty simple.

Gentoo rocks.

Daniel
- -- 
Proudly a Gentoo User.
GnuPG/PGP signed and encrypted email preferred
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x32A64DC8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/nOWMTDSbtjKmTcgRAqOTAKDIzZ/xd+89mlKysJssYtIJBYaPtQCgs1x0
1mdLIhN4yCtqv9uomI1sqQo=
=pvKx
-----END PGP SIGNATURE-----


--
[EMAIL PROTECTED] mailing list

Reply via email to