Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-21 Thread James Ausmus

On 9/20/06, Neil Bothwick [EMAIL PROTECTED] wrote:

On Wed, 20 Sep 2006 14:35:09 +0100, Neil Bothwick wrote:

 I haven't tried using it for this, but I wonder if RC_USE_CONFIG_PROFILE
 would help. See /etc/conf.d/rc for details but basically you set up
 different configs for different runlevels, so you could have a different
 runlevel for each situation, but make the actual runlevel directories
 symlinks to default. Selecting the runlevel on rebooting would certainly
 pick up the appropriate config, you'd have to try it to see what happens
 when switching runlevels while running.



Have you checked out net-misc/netprofiles-ims? I haven't, but it looks
promising (it's only keyworded for x86 currently, dunno why, dunno
what platform you're running).

-James




I've run a couple of tests now, using different /etc/conf.d/net.runlevel
files. Switching runlevels on the fly doesn't cause the new configs to be
loaded, but restarting the network afterwards does. I expect this is fine
for your needs, as you are unlikely to have the network running while
between locations. Even if you are, you only need to do

rc newrunlevel
/etc/init.d/net.eth0 restart

to switch over. The VPN and other stuff you need to run is easily handled
in the postup() function of the relevant net.runlevel file.


--
Neil Bothwick

If this were an actual tagline, it would be funny.




--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-20 Thread Neil Bothwick
On Wed, 20 Sep 2006 09:48:11 +0800, W.Kenworthy wrote:

 If I set the NIC to DHCP as you advise, you are implying that gentoo
 will handle the various fixed IP's, subnets, gateways and differing vpn
 schemes automaticly?  How can it do that?  Only some of the networks
 (only three in fact) use DHCP.

It will only do it automatically if there is a DHCP server on the
network. There is a fallback option in in Gentoo settings for when DHCP
fails.

 ifplugd looks interesting - possibly the best I can do will be to use
 ifplugd to trigger if-up and if-up will have to contain the various add
 ons like the vpns and service restarting with functions to detect which
 to run where.

Don't do that, it will conflict with Gentoo's setup. As I said before,
don't do anything with ifplugd beyond emerging it. The Gentoo scripts
detect it is there and use it. Put all your scripting in /etc/conf.d/net.

 No relief from the nightmare I am afraid ...

Why is this nightmare anything to do with Gentoo? If you connect to
networks that require manual configuration, you have to configure
manually. At least the functions in conf.d/net allow you to automate a
substantial part of the process.

Take a close look at /etc/conf.d/net.example, I think you'll find it can
do most, if not all, of what you want.


-- 
Neil Bothwick

You have a tendency to feel you are superior to most computers.


signature.asc
Description: PGP signature


Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-20 Thread William Kenworthy
On Wed, 2006-09-20 at 08:45 +0100, Neil Bothwick wrote:
 On Wed, 20 Sep 2006 09:48:11 +0800, W.Kenworthy wrote:
 
...
 
  No relief from the nightmare I am afraid ...
 
 Why is this nightmare anything to do with Gentoo? If you connect to
 networks that require manual configuration, you have to configure
 manually. At least the functions in conf.d/net allow you to automate a
 substantial part of the process.
 
 Take a close look at /etc/conf.d/net.example, I think you'll find it can
 do most, if not all, of what you want.
 
 
The nightmare is that gentoo will only handle a small subset of the
networks I need to connect to at any one time (i.e., I cant configure
all the networks in the one set of config files - see my original post
for the permutations).  I cant see that gentoo's method will allow me to
handle all the permutations without having scripts to reconfigure it at
each site by copying in new files and restarting services/vpn's and
athentications depending on what is required at each site.  The reason I
posted this originally is that the above process keeping separate
configs has been working for years (inc. when I was using Mandrake) and
I am happy to keep doing that - however something in gentoo's latest
baselayout breaks things like zebedee and openvpn (flakey on start/stop)
in this scenario.

BillK

-- 
William Kenworthy [EMAIL PROTECTED]
Home!
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-20 Thread Neil Bothwick
On Wed, 20 Sep 2006 20:21:25 +0800, William Kenworthy wrote:

 The nightmare is that gentoo will only handle a small subset of the
 networks I need to connect to at any one time (i.e., I cant configure
 all the networks in the one set of config files - see my original post
 for the permutations).  I cant see that gentoo's method will allow me to
 handle all the permutations without having scripts to reconfigure it at
 each site by copying in new files and restarting services/vpn's and
 athentications depending on what is required at each site. 

I haven't tried using it for this, but I wonder if RC_USE_CONFIG_PROFILE
would help. See /etc/conf.d/rc for details but basically you set up
different configs for different runlevels, so you could have a different
runlevel for each situation, but make the actual runlevel directories
symlinks to default. Selecting the runlevel on rebooting would certainly
pick up the appropriate config, you'd have to try it to see what happens
when switching runlevels while running.


-- 
Neil Bothwick

Bother, said Pooh, as someone else stole his taglines.


signature.asc
Description: PGP signature


Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-20 Thread Neil Bothwick
On Wed, 20 Sep 2006 14:35:09 +0100, Neil Bothwick wrote:

 I haven't tried using it for this, but I wonder if RC_USE_CONFIG_PROFILE
 would help. See /etc/conf.d/rc for details but basically you set up
 different configs for different runlevels, so you could have a different
 runlevel for each situation, but make the actual runlevel directories
 symlinks to default. Selecting the runlevel on rebooting would certainly
 pick up the appropriate config, you'd have to try it to see what happens
 when switching runlevels while running.

I've run a couple of tests now, using different /etc/conf.d/net.runlevel
files. Switching runlevels on the fly doesn't cause the new configs to be
loaded, but restarting the network afterwards does. I expect this is fine
for your needs, as you are unlikely to have the network running while
between locations. Even if you are, you only need to do

rc newrunlevel
/etc/init.d/net.eth0 restart

to switch over. The VPN and other stuff you need to run is easily handled
in the postup() function of the relevant net.runlevel file.


-- 
Neil Bothwick

If this were an actual tagline, it would be funny.


signature.asc
Description: PGP signature


[gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-19 Thread W.Kenworthy
Can the new baselayout handle multiple networks seamlessly?

I currently connect to multiple networks using a laptop with an ipw2200
wireless and a built in NIC consisting of:
NIC, fixed IP
NIC, DHCP
NIC, DHCP and openvpn
NIC, DHCP and CiscoVPN
wireless with wpa/tkip
wireless with wpa/tkip and openvpn
wireless plain with openvpn
wireless plain with CiscoVPN.
all configs have common services like a caching bind server, zebedee and
apache and various other services not normally seen on a laptop.  These
usually need restarting in order for the new config to take.

and obviously more than one network of each type in some cases.
It is wireless or NIC, not both at once.

Currently I arrive at a site and run a script that copies in the config
files for the needed configuration, and then restarts the needed
services.  This broke with the last baselayout changes - wierd things
happen like zebedee running ok when the initscript is run from the
commandline, but not from a script.  So I reverted, but I am thinking I
need to redesign the system or start making bug reports in order to use
the latest changes.

Also, is there an integrated way to plug in a network cable and have a
config RELIABLY recognised and trigger the necessary actions?  Its not a
good look to arrive at lecture in front of 30-50 people and struggle to
connect to the local network, which seems par for the course for gentoo!

BillK

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Can the new baselayout handle multiple networks seamlessly?

2006-09-19 Thread W.Kenworthy
If I set the NIC to DHCP as you advise, you are implying that gentoo
will handle the various fixed IP's, subnets, gateways and differing vpn
schemes automaticly?  How can it do that?  Only some of the networks
(only three in fact) use DHCP.

ifplugd looks interesting - possibly the best I can do will be to use
ifplugd to trigger if-up and if-up will have to contain the various add
ons like the vpns and service restarting with functions to detect which
to run where.  No relief from the nightmare I am afraid ...

BillK


On Wed, 2006-09-20 at 01:05 +0100, Neil Bothwick wrote:
 On Wed, 20 Sep 2006 06:58:11 +0800, W.Kenworthy wrote:
 
  Also, is there an integrated way to plug in a network cable and have a
  config RELIABLY recognised and trigger the necessary actions?  Its not a
  good look to arrive at lecture in front of 30-50 people and struggle to
  connect to the local network, which seems par for the course for gentoo!
 
 emerge ifplugd, but don't try to configure it, Gentoo's networking
 scripts handle that automatically.
 
 Set your wired interface to use DHCP and it should set itself up
 automatically. If you want something else done when connecting or
 disconnecting the cable, such as shutting down wireless or restarting
 services, look at the preup/postup/predown/postdown functions
 in /etc/conf.d/net.example.
 
 
-- 
gentoo-user@gentoo.org mailing list