Re: How to manager different network environments?
Thanks, works like a charm! :-) Auke On Tue, Nov 05, 2002 at 09:58:20PM +1300, Andrew McMillan wrote: > > That's "ACPI", not "APIC" :-) > > Either that or APM - depending on the age of your laptop. Newer ones > will work better with ACPI, but I'm not sure how well that handles > suspend / resume events as I use APM with my laptop. > > For APM, whereami puts a hook into /etc/apm/event.d which makes it run > basically 'whenever there is an event'. > > For ACPI, a script called /etc/acpi/events/default gets run. This is > not hooked into whereami, but that's where it would get done. > > Unfortunately the ACPI handling is not fully mature yet, so the script > doesn't do a run-parts... on some directory to let other packages more > easily hook into it. (H... maybe I feel a wishlist bug coming on... > :-) > > Cheers, > Andrew -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ pgphWQX0FltMh.pgp Description: PGP signature
Re: How to manager different network environments?
Thanks, works like a charm! :-) Auke On Tue, Nov 05, 2002 at 09:58:20PM +1300, Andrew McMillan wrote: > > That's "ACPI", not "APIC" :-) > > Either that or APM - depending on the age of your laptop. Newer ones > will work better with ACPI, but I'm not sure how well that handles > suspend / resume events as I use APM with my laptop. > > For APM, whereami puts a hook into /etc/apm/event.d which makes it run > basically 'whenever there is an event'. > > For ACPI, a script called /etc/acpi/events/default gets run. This is > not hooked into whereami, but that's where it would get done. > > Unfortunately the ACPI handling is not fully mature yet, so the script > doesn't do a run-parts... on some directory to let other packages more > easily hook into it. (H... maybe I feel a wishlist bug coming on... > :-) > > Cheers, > Andrew -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ msg09414/pgp0.pgp Description: PGP signature
Re: How to manager different network environments?
On Sun, 2002-10-06 at 00:34, Derek Broughton wrote: > > > Unfortunately the ACPI handling is not fully mature yet, so the script > > doesn't do a run-parts... on some directory to let other packages more > > easily hook into it. (H... maybe I feel a wishlist bug coming on... > > :-) > > > > Well, it's pretty trivial. > > The default.sh as distributed doesn't do anything except shut down cleanly > when > the power button is pressed. Everything else is up to the individual user. > > So, resume your PC, go to the log and look at exactly what message was sent, > go > back to default.sh add a line in the "case $1" statement to handle whatever > value is in the first (and possibly second) word of the event and do run-parts > on /etc/acpi/resume.d > > Then send a diff to the maintainer :-) The problem, and likely reason why it > hasn't been done, is that it's difficult for acpid to know what all the values > in the event are. As you see in the current default.sh, it already has two > options for the power button "power" and "PBTN", but the real value is defined > in the machine's DSDT table (in BIOS - mine is PWRF). I'd do it myself, > except > that I can't get suspend/resume working on my machine... Sounds to me like you are first telling me it's trivial, and then going on to explain just how _non_ trivial it actually is! :-) I realise roughly what the patch would look like, but the devil is in the details. Personally I couldn't see myself providing a patch like that until I had a laptop that forced me to use ACPI, or if ACPI matured enough to give me better functionality in other areas - the ability to control fans, read sensors and so forth. My current beast is 18 months old and works very well with APM. Maybe someone else will have that itch and scratch it before I even get bitten :-) Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ -
Re: How to manager different network environments?
On Sun, 2002-10-06 at 00:34, Derek Broughton wrote: > > > Unfortunately the ACPI handling is not fully mature yet, so the script > > doesn't do a run-parts... on some directory to let other packages more > > easily hook into it. (H... maybe I feel a wishlist bug coming on... > > :-) > > > > Well, it's pretty trivial. > > The default.sh as distributed doesn't do anything except shut down cleanly when > the power button is pressed. Everything else is up to the individual user. > > So, resume your PC, go to the log and look at exactly what message was sent, go > back to default.sh add a line in the "case $1" statement to handle whatever > value is in the first (and possibly second) word of the event and do run-parts > on /etc/acpi/resume.d > > Then send a diff to the maintainer :-) The problem, and likely reason why it > hasn't been done, is that it's difficult for acpid to know what all the values > in the event are. As you see in the current default.sh, it already has two > options for the power button "power" and "PBTN", but the real value is defined > in the machine's DSDT table (in BIOS - mine is PWRF). I'd do it myself, except > that I can't get suspend/resume working on my machine... Sounds to me like you are first telling me it's trivial, and then going on to explain just how _non_ trivial it actually is! :-) I realise roughly what the patch would look like, but the devil is in the details. Personally I couldn't see myself providing a patch like that until I had a laptop that forced me to use ACPI, or if ACPI matured enough to give me better functionality in other areas - the ability to control fans, read sensors and so forth. My current beast is 18 months old and works very well with APM. Maybe someone else will have that itch and scratch it before I even get bitten :-) Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
OoO Pendant le repas du lundi 04 novembre 2002, vers 19:56, Andrew McMillan <[EMAIL PROTECTED]> disait: > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. The problem with this approach is that some network interfaces do not do the detection of the link if they are asleep. And if they are down, they are asleep. It is the case on my iBook. I have circumvent the difficulty in whereami: I "up" the interface, wait a bit and test the link. But I think that doing this every 5 seconds may draw the battery. Grab ethtool and test it on an interface which has been down for 15 seconds to test. -- BOFH excuse #404: Sysadmin accidentally destroyed pager with a large hammer.
Re: How to manager different network environments?
OoO Pendant le repas du lundi 04 novembre 2002, vers 19:56, Andrew McMillan <[EMAIL PROTECTED]> disait: > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. The problem with this approach is that some network interfaces do not do the detection of the link if they are asleep. And if they are down, they are asleep. It is the case on my iBook. I have circumvent the difficulty in whereami: I "up" the interface, wait a bit and test the link. But I think that doing this every 5 seconds may draw the battery. Grab ethtool and test it on an interface which has been down for 15 seconds to test. -- BOFH excuse #404: Sysadmin accidentally destroyed pager with a large hammer. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > Unfortunately the ACPI handling is not fully mature yet, so the script > doesn't do a run-parts... on some directory to let other packages more > easily hook into it. (H... maybe I feel a wishlist bug coming on... > :-) > Well, it's pretty trivial. The default.sh as distributed doesn't do anything except shut down cleanly when the power button is pressed. Everything else is up to the individual user. So, resume your PC, go to the log and look at exactly what message was sent, go back to default.sh add a line in the "case $1" statement to handle whatever value is in the first (and possibly second) word of the event and do run-parts on /etc/acpi/resume.d Then send a diff to the maintainer :-) The problem, and likely reason why it hasn't been done, is that it's difficult for acpid to know what all the values in the event are. As you see in the current default.sh, it already has two options for the power button "power" and "PBTN", but the real value is defined in the machine's DSDT table (in BIOS - mine is PWRF). I'd do it myself, except that I can't get suspend/resume working on my machine...
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > Unfortunately the ACPI handling is not fully mature yet, so the script > doesn't do a run-parts... on some directory to let other packages more > easily hook into it. (H... maybe I feel a wishlist bug coming on... > :-) > Well, it's pretty trivial. The default.sh as distributed doesn't do anything except shut down cleanly when the power button is pressed. Everything else is up to the individual user. So, resume your PC, go to the log and look at exactly what message was sent, go back to default.sh add a line in the "case $1" statement to handle whatever value is in the first (and possibly second) word of the event and do run-parts on /etc/acpi/resume.d Then send a diff to the maintainer :-) The problem, and likely reason why it hasn't been done, is that it's difficult for acpid to know what all the values in the event are. As you see in the current default.sh, it already has two options for the power button "power" and "PBTN", but the real value is defined in the machine's DSDT table (in BIOS - mine is PWRF). I'd do it myself, except that I can't get suspend/resume working on my machine... -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
I'm using ifplugd to detect cable insertion, it works perfectly. Since I mostly use the laptop in a single network I do not know how it integrates with programs like whereami. Baruch * Andrew McMillan <[EMAIL PROTECTED]> [021104 23:18]: > On Tue, 2002-11-05 at 05:42, Craig Genner wrote: > > I'm going to be in a similar situation soon where I will be swapping network > > locations but I will be using an inbuilt network device, not a pcmcia card. > > How would I also get to autodetect when the network cable has been plugged > > in and then start the network services, and stop the same services when it > > is unplugged. > > With pcmcia you just look for the card but it would be harder with a network > > cable > > Yes. I plug my cable in before opening the lid, and then whereami runs > on the apm resume event. > > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. > > Cheers, > Andrew. -- Baruch Even http://baruch.ev-en.org/ http://www.nongnu.org/chktex/
Re: How to manager different network environments?
I'm using ifplugd to detect cable insertion, it works perfectly. Since I mostly use the laptop in a single network I do not know how it integrates with programs like whereami. Baruch * Andrew McMillan <[EMAIL PROTECTED]> [021104 23:18]: > On Tue, 2002-11-05 at 05:42, Craig Genner wrote: > > I'm going to be in a similar situation soon where I will be swapping network > > locations but I will be using an inbuilt network device, not a pcmcia card. > > How would I also get to autodetect when the network cable has been plugged > > in and then start the network services, and stop the same services when it > > is unplugged. > > With pcmcia you just look for the card but it would be harder with a network > > cable > > Yes. I plug my cable in before opening the lid, and then whereami runs > on the apm resume event. > > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. > > Cheers, > Andrew. -- Baruch Even http://baruch.ev-en.org/ http://www.nongnu.org/chktex/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
On Tue, 2002-11-05 at 11:39, Auke Jilderda wrote: > Exactly how do you run whereami on the apm resume event? Is that > hardware/BIOS dependent or can I do it with the regular APM support in > the Linux kernel? I've been reading up on this but couldn't quite find > it, it seems like I need APIC to do this, is that correct? That's "ACPI", not "APIC" :-) Either that or APM - depending on the age of your laptop. Newer ones will work better with ACPI, but I'm not sure how well that handles suspend / resume events as I use APM with my laptop. For APM, whereami puts a hook into /etc/apm/event.d which makes it run basically 'whenever there is an event'. For ACPI, a script called /etc/acpi/events/default gets run. This is not hooked into whereami, but that's where it would get done. Unfortunately the ACPI handling is not fully mature yet, so the script doesn't do a run-parts... on some directory to let other packages more easily hook into it. (H... maybe I feel a wishlist bug coming on... :-) Cheers, Andrew -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ -
Re: How to manager different network environments?
On Tue, 2002-11-05 at 11:39, Auke Jilderda wrote: > Exactly how do you run whereami on the apm resume event? Is that > hardware/BIOS dependent or can I do it with the regular APM support in > the Linux kernel? I've been reading up on this but couldn't quite find > it, it seems like I need APIC to do this, is that correct? That's "ACPI", not "APIC" :-) Either that or APM - depending on the age of your laptop. Newer ones will work better with ACPI, but I'm not sure how well that handles suspend / resume events as I use APM with my laptop. For APM, whereami puts a hook into /etc/apm/event.d which makes it run basically 'whenever there is an event'. For ACPI, a script called /etc/acpi/events/default gets run. This is not hooked into whereami, but that's where it would get done. Unfortunately the ACPI handling is not fully mature yet, so the script doesn't do a run-parts... on some directory to let other packages more easily hook into it. (H... maybe I feel a wishlist bug coming on... :-) Cheers, Andrew -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
Exactly how do you run whereami on the apm resume event? Is that hardware/BIOS dependent or can I do it with the regular APM support in the Linux kernel? I've been reading up on this but couldn't quite find it, it seems like I need APIC to do this, is that correct? Auke On Tue, Nov 05, 2002 at 07:56:21AM +1300, Andrew McMillan wrote: > > Yes. I plug my cable in before opening the lid, and then whereami runs > on the apm resume event. > > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. > > Cheers, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ pgpI5iZJ5qc4Q.pgp Description: PGP signature
Re: How to manager different network environments?
Exactly how do you run whereami on the apm resume event? Is that hardware/BIOS dependent or can I do it with the regular APM support in the Linux kernel? I've been reading up on this but couldn't quite find it, it seems like I need APIC to do this, is that correct? Auke On Tue, Nov 05, 2002 at 07:56:21AM +1300, Andrew McMillan wrote: > > Yes. I plug my cable in before opening the lid, and then whereami runs > on the apm resume event. > > I want to add some sort of cable detection daemon though, and trigger on > that, or get one of the existing ones to provide a it more of an > interface that whereami can use. > > Cheers, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ msg09354/pgp0.pgp Description: PGP signature
Re: How to manager different network environments?
On Tue, 2002-11-05 at 05:42, Craig Genner wrote: > I'm going to be in a similar situation soon where I will be swapping network > locations but I will be using an inbuilt network device, not a pcmcia card. > How would I also get to autodetect when the network cable has been plugged > in and then start the network services, and stop the same services when it > is unplugged. > With pcmcia you just look for the card but it would be harder with a network > cable Yes. I plug my cable in before opening the lid, and then whereami runs on the apm resume event. I want to add some sort of cable detection daemon though, and trigger on that, or get one of the existing ones to provide a it more of an interface that whereami can use. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ -
Re: How to manager different network environments?
On Tue, 2002-11-05 at 05:42, Craig Genner wrote: > I'm going to be in a similar situation soon where I will be swapping network > locations but I will be using an inbuilt network device, not a pcmcia card. > How would I also get to autodetect when the network cable has been plugged > in and then start the network services, and stop the same services when it > is unplugged. > With pcmcia you just look for the card but it would be harder with a network > cable Yes. I plug my cable in before opening the lid, and then whereami runs on the apm resume event. I want to add some sort of cable detection daemon though, and trigger on that, or get one of the existing ones to provide a it more of an interface that whereami can use. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
I'm going to be in a similar situation soon where I will be swapping network locations but I will be using an inbuilt network device, not a pcmcia card. How would I also get to autodetect when the network cable has been plugged in and then start the network services, and stop the same services when it is unplugged. With pcmcia you just look for the card but it would be harder with a network cable Craig - Original Message - From: "Mariano Kamp" <[EMAIL PROTECTED]> To: "Andrew McMillan" <[EMAIL PROTECTED]>; Cc: "Chris Halls" <[EMAIL PROTECTED]> Sent: Sunday, November 03, 2002 8:57 PM Subject: Re: How to manager different network environments? > Hi Andrew, Chris, > > > meanwhile I installed whereami and do my first steps. > > > > > > Currently I am working on my wlan card and am wondering why whereami > > > is triggered in /etc/pcmcia/network when the card is inserted, but not > > > when it is removed? > > > > H... It should do that too, I guess, but I don't think that pcmcia > > has any hooks to trigger things on removal. > > > > I will look into it. > Unfortunately I don't have a clue about scripts yet. I tried to copy the > hook for whereami from the start section of the network script to the > stop section, but without much success. Whereami is called then, but > unfortunately before the removal of the wlan modules, so that whereami > still detects them. > > > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > > plugged the ethernet cable?! How is that to be accomplished? > > > > That's tricky! I know there is a daemon in laptop-net that monitors > > the mii status for cable insertion. I have been thinking of merging > > some of that into whereami, but only discovered it last week. > > > > Not sure what Chris is doing - perhaps he could elucidate! > It's not a top priority for me. I was keen to use it, but more for the > fun than that I really need it ;-) > > Cheers, > Mariano > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > >
Re: How to manager different network environments?
I'm going to be in a similar situation soon where I will be swapping network locations but I will be using an inbuilt network device, not a pcmcia card. How would I also get to autodetect when the network cable has been plugged in and then start the network services, and stop the same services when it is unplugged. With pcmcia you just look for the card but it would be harder with a network cable Craig - Original Message - From: "Mariano Kamp" <[EMAIL PROTECTED]> To: "Andrew McMillan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "Chris Halls" <[EMAIL PROTECTED]> Sent: Sunday, November 03, 2002 8:57 PM Subject: Re: How to manager different network environments? > Hi Andrew, Chris, > > > meanwhile I installed whereami and do my first steps. > > > > > > Currently I am working on my wlan card and am wondering why whereami > > > is triggered in /etc/pcmcia/network when the card is inserted, but not > > > when it is removed? > > > > H... It should do that too, I guess, but I don't think that pcmcia > > has any hooks to trigger things on removal. > > > > I will look into it. > Unfortunately I don't have a clue about scripts yet. I tried to copy the > hook for whereami from the start section of the network script to the > stop section, but without much success. Whereami is called then, but > unfortunately before the removal of the wlan modules, so that whereami > still detects them. > > > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > > plugged the ethernet cable?! How is that to be accomplished? > > > > That's tricky! I know there is a daemon in laptop-net that monitors > > the mii status for cable insertion. I have been thinking of merging > > some of that into whereami, but only discovered it last week. > > > > Not sure what Chris is doing - perhaps he could elucidate! > It's not a top priority for me. I was keen to use it, but more for the > fun than that I really need it ;-) > > Cheers, > Mariano > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
On Sun, Nov 03, 2002 at 09:57:15PM +0100, Mariano Kamp wrote: > > H... It should do that too, I guess, but I don't think that pcmcia > > has any hooks to trigger things on removal. > > > > I will look into it. > Unfortunately I don't have a clue about scripts yet. I tried to copy the > hook for whereami from the start section of the network script to the > stop section, but without much success. Whereami is called then, but > unfortunately before the removal of the wlan modules, so that whereami > still detects them. You could try using the --hint option to pass a location to whereami. For example: - call whereami from pcmcia exit with --hint pcmcia_stop - in detect.conf: if pcmcia_stop else testmodlue wlan_cs wlan fi That should prevent the wlan location from being set if in the stop hook. The arrangement would have to be a little more complicated if you have more than one pcmcia card (maybe add a second hint which is the name of the card to the whereami hook?) > > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > > plugged the ethernet cable?! How is that to be accomplished? > > > > That's tricky! I know there is a daemon in laptop-net that monitors > > the mii status for cable insertion. I have been thinking of merging > > some of that into whereami, but only discovered it last week. > > > > Not sure what Chris is doing - perhaps he could elucidate! Erm, sorry I must have tricked you into thinking that happened automatically :) but that isn't the case :( . If I remember correctly, I typed 'whereami' after unplugging/plugging the cable in to trigger the detection and showed you the output on screen (or maybe that was someone else). There are hooks into apm (see /etc/whereami/apm.conf) so that you can run whereami when the machine wakes up. I always make sure that the network cable is plugged in before I wake the machine up; if I forget and plug in the cable afterwards I run whereami manually. Chris pgpkgVvMdANkv.pgp Description: PGP signature
Re: How to manager different network environments?
On Sun, Nov 03, 2002 at 09:57:15PM +0100, Mariano Kamp wrote: > > H... It should do that too, I guess, but I don't think that pcmcia > > has any hooks to trigger things on removal. > > > > I will look into it. > Unfortunately I don't have a clue about scripts yet. I tried to copy the > hook for whereami from the start section of the network script to the > stop section, but without much success. Whereami is called then, but > unfortunately before the removal of the wlan modules, so that whereami > still detects them. You could try using the --hint option to pass a location to whereami. For example: - call whereami from pcmcia exit with --hint pcmcia_stop - in detect.conf: if pcmcia_stop else testmodlue wlan_cs wlan fi That should prevent the wlan location from being set if in the stop hook. The arrangement would have to be a little more complicated if you have more than one pcmcia card (maybe add a second hint which is the name of the card to the whereami hook?) > > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > > plugged the ethernet cable?! How is that to be accomplished? > > > > That's tricky! I know there is a daemon in laptop-net that monitors > > the mii status for cable insertion. I have been thinking of merging > > some of that into whereami, but only discovered it last week. > > > > Not sure what Chris is doing - perhaps he could elucidate! Erm, sorry I must have tricked you into thinking that happened automatically :) but that isn't the case :( . If I remember correctly, I typed 'whereami' after unplugging/plugging the cable in to trigger the detection and showed you the output on screen (or maybe that was someone else). There are hooks into apm (see /etc/whereami/apm.conf) so that you can run whereami when the machine wakes up. I always make sure that the network cable is plugged in before I wake the machine up; if I forget and plug in the cable afterwards I run whereami manually. Chris msg09331/pgp0.pgp Description: PGP signature
Re: How to manager different network environments?
Hi Andrew, Chris, > > meanwhile I installed whereami and do my first steps. > > > > Currently I am working on my wlan card and am wondering why whereami > > is triggered in /etc/pcmcia/network when the card is inserted, but not > > when it is removed? > > H... It should do that too, I guess, but I don't think that pcmcia > has any hooks to trigger things on removal. > > I will look into it. Unfortunately I don't have a clue about scripts yet. I tried to copy the hook for whereami from the start section of the network script to the stop section, but without much success. Whereami is called then, but unfortunately before the removal of the wlan modules, so that whereami still detects them. > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > plugged the ethernet cable?! How is that to be accomplished? > > That's tricky! I know there is a daemon in laptop-net that monitors > the mii status for cable insertion. I have been thinking of merging > some of that into whereami, but only discovered it last week. > > Not sure what Chris is doing - perhaps he could elucidate! It's not a top priority for me. I was keen to use it, but more for the fun than that I really need it ;-) Cheers, Mariano
Re: How to manager different network environments?
Hi Andrew, Chris, > > meanwhile I installed whereami and do my first steps. > > > > Currently I am working on my wlan card and am wondering why whereami > > is triggered in /etc/pcmcia/network when the card is inserted, but not > > when it is removed? > > H... It should do that too, I guess, but I don't think that pcmcia > has any hooks to trigger things on removal. > > I will look into it. Unfortunately I don't have a clue about scripts yet. I tried to copy the hook for whereami from the start section of the network script to the stop section, but without much success. Whereami is called then, but unfortunately before the removal of the wlan modules, so that whereami still detects them. > > On lwe I've seen on Chris' laptop, that whereami was triggered when he > > plugged the ethernet cable?! How is that to be accomplished? > > That's tricky! I know there is a daemon in laptop-net that monitors > the mii status for cable insertion. I have been thinking of merging > some of that into whereami, but only discovered it last week. > > Not sure what Chris is doing - perhaps he could elucidate! It's not a top priority for me. I was keen to use it, but more for the fun than that I really need it ;-) Cheers, Mariano -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
From: "Auke Jilderda" <[EMAIL PROTECTED]> > Derek, > > I already took a shot at extending Andrew's script for use with Exim. > Have a look at my updated version of "setmailrelay", it's not complete > but works in my setup. We'll need to make it a bit more robust > (handling the standard distributed config file of Exim in which the > "queue_remote_domains" option isn't mentioned. Great. You're way ahead of me. I'll give it a try and see if there's anything I can add.
Re: How to manager different network environments?
Derek,
I already took a shot at extending Andrew's script for use with Exim.
Have a look at my updated version of "setmailrelay", it's not complete
but works in my setup. We'll need to make it a bit more robust
(handling the standard distributed config file of Exim in which the
"queue_remote_domains" option isn't mentioned.
Auke
On Wed, Oct 30, 2002 at 09:03:17AM -0400, Derek Broughton wrote:
> From: "Andrew McMillan" <[EMAIL PROTECTED]>
> > Unfortunately it isn't quite that straightforward. The setmailrelay
> > script needs to update the configuration file for exim, make changes so
> > that mail is relayed differently, and then restart it.
> >
> > It isn't _hard_ but Exim isn't compatible with sendmail at the
> > configuration file level, unless I miss my guess.
>
> oh... 'fraid so. The Exim configuration is, imo, a whole lot simpler
> - but that doesn't mean applying config changes for sendmail is going
> to work :-) Having opened my mouth when I shouldn't, I'll take a look
> at setmailrelay and see what it would need to work with Exim :-)
>
> derek
--
PGP: 0x4A34DD6D, http://bunny.sourceforge.net/
#!/bin/bash
# This script was written originally by Jos Visser http://www.josv.com/~josv/
# and I have modified it a little to make it slightly more generic
#- Andrew McMillan 10 August 1999
# Postfix support by Chris Halls, August 2001
#
# Usage:
# setmailrelay none
# - You have a permanent internet connection, do not use a mail relay
# setmailrelay
# - Relay to specified host
# setmailrelay queue []
# - Do not send, place on the queue. When the queue is flushed, mail
# will be relayed to , or $DEFAULT_RELAY if not specified
# Where are the config files for your mailer? Can override in mail-relay.conf
SENDMAIL_CONFFILE=/etc/mail/sendmail.cf
POSTFIX_CONFFILE=/etc/postfix/main.cf
EXIM_CONFFILE=/etc/exim/exim.conf
. /etc/whereami/mail-relay.conf
RELAY="$1"
QUEUE_RELAY="${2:-${DEFAULT_RELAY}}"
# check for a "parameter=" line in a file, add it if it does not exist
#check_for_line(file, parameter)
check_for_parameter()
{
FILE="$1"
PARAM="$2"
if egrep -q "^$PARAM *=" "$FILE" ; then :
else
echo "$PARAM=" >> "$FILE"
fi
}
echo "Setting mail relay host ($RELAY)"
if [ -f $SENDMAIL_CONFFILE ] ; then
if [ -f /var/run/sendmail.pid ]; then
pid=$(head -1 /var/run/sendmail.pid)
kill $pid
sleep 3
rm /var/run/sendmail.pid
fi
if [ "$RELAY" = "none" ]; then
MODE=background
QUEUE_RUN="-q5m"
RELAY=""
elif [ "$RELAY" = "queue" ]; then
MODE=deferred
QUEUE_RUN=""
RELAY="smtp:${DEFAULT_RELAY}"
else
MODE=background
QUEUE_RUN="-q5m"
RELAY="smtp:$RELAY"
fi
sed -e "s/^DS.*\$/DS$RELAY/" \
-e "s/^O DeliveryMode=.*\$/O DeliveryMode=$MODE/" \
<$SENDMAIL_CONFFILE >$SENDMAIL_CONFFILE.N
# Make a backup copy
mv -f $SENDMAIL_CONFFILE $SENDMAIL_CONFFILE.whereami
mv $SENDMAIL_CONFFILE.N $SENDMAIL_CONFFILE
`which sendmail` -bd $QUEUE_RUN
fi
if [ -f $POSTFIX_CONFFILE ] ; then
if [ "$RELAY" = "none" ]; then
DEFER=""
DISABLE_LOOKUPS="no"
RELAY=""
elif [ "$RELAY" = "queue" ]; then
DEFER="smtp"
DISABLE_LOOKUPS="yes"
RELAY="$DEFAULT_RELAY"
else
DEFER=""
DISABLE_LOOKUPS="yes"
MODE=background
RELAY="$RELAY"
fi
# Add paramters to config file if they do not exist
check_for_parameter $POSTFIX_CONFFILE "defer_transports"
check_for_parameter $POSTFIX_CONFFILE "disable_dns_lookups"
check_for_parameter $POSTFIX_CONFFILE "relayhost"
sed -e "s/^defer_transports *=.*\$/defer_transports=$DEFER/" \
-e "s/^disable_dns_lookups
*=.*\$/disable_dns_lookups=$DISABLE_LOOKUPS/" \
-e "s/^relayhost *=.*\$/relayhost=$RELAY/" \
< $POSTFIX_CONFFILE > $POSTFIX_CONFFILE.N
# Make a backup copy
mv -f $POSTFIX_CONFFILE $POSTFIX_CONFFILE.whereami
mv $POSTFIX_CONFFILE.N $POSTFIX_CONFFILE
# Reload config
/etc/init.d/postfix reload
if [ "$RELAY" != "queue" ]; then
# Run mail queue
/etc/init.d/postfix flush
fi
fi
if [ -f $EXIM_CONFFILE ] ; then
if [ "$RELAY" = "none" ]; then
DEFER="# queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
elif [ "$RELAY" = "queue" ]; then
DEFER="queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
else
DEFER="# queue_remote_domains = *"
RELAY="$RELAY"
fi
Re: How to manager different network environments?
From: "Auke Jilderda" <[EMAIL PROTECTED]> > Derek, > > I already took a shot at extending Andrew's script for use with Exim. > Have a look at my updated version of "setmailrelay", it's not complete > but works in my setup. We'll need to make it a bit more robust > (handling the standard distributed config file of Exim in which the > "queue_remote_domains" option isn't mentioned. Great. You're way ahead of me. I'll give it a try and see if there's anything I can add. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
Derek,
I already took a shot at extending Andrew's script for use with Exim.
Have a look at my updated version of "setmailrelay", it's not complete
but works in my setup. We'll need to make it a bit more robust
(handling the standard distributed config file of Exim in which the
"queue_remote_domains" option isn't mentioned.
Auke
On Wed, Oct 30, 2002 at 09:03:17AM -0400, Derek Broughton wrote:
> From: "Andrew McMillan" <[EMAIL PROTECTED]>
> > Unfortunately it isn't quite that straightforward. The setmailrelay
> > script needs to update the configuration file for exim, make changes so
> > that mail is relayed differently, and then restart it.
> >
> > It isn't _hard_ but Exim isn't compatible with sendmail at the
> > configuration file level, unless I miss my guess.
>
> oh... 'fraid so. The Exim configuration is, imo, a whole lot simpler
> - but that doesn't mean applying config changes for sendmail is going
> to work :-) Having opened my mouth when I shouldn't, I'll take a look
> at setmailrelay and see what it would need to work with Exim :-)
>
> derek
--
PGP: 0x4A34DD6D, http://bunny.sourceforge.net/
#!/bin/bash
# This script was written originally by Jos Visser http://www.josv.com/~josv/
# and I have modified it a little to make it slightly more generic
#- Andrew McMillan 10 August 1999
# Postfix support by Chris Halls, August 2001
#
# Usage:
# setmailrelay none
# - You have a permanent internet connection, do not use a mail relay
# setmailrelay
# - Relay to specified host
# setmailrelay queue []
# - Do not send, place on the queue. When the queue is flushed, mail
# will be relayed to , or $DEFAULT_RELAY if not specified
# Where are the config files for your mailer? Can override in mail-relay.conf
SENDMAIL_CONFFILE=/etc/mail/sendmail.cf
POSTFIX_CONFFILE=/etc/postfix/main.cf
EXIM_CONFFILE=/etc/exim/exim.conf
. /etc/whereami/mail-relay.conf
RELAY="$1"
QUEUE_RELAY="${2:-${DEFAULT_RELAY}}"
# check for a "parameter=" line in a file, add it if it does not exist
#check_for_line(file, parameter)
check_for_parameter()
{
FILE="$1"
PARAM="$2"
if egrep -q "^$PARAM *=" "$FILE" ; then :
else
echo "$PARAM=" >> "$FILE"
fi
}
echo "Setting mail relay host ($RELAY)"
if [ -f $SENDMAIL_CONFFILE ] ; then
if [ -f /var/run/sendmail.pid ]; then
pid=$(head -1 /var/run/sendmail.pid)
kill $pid
sleep 3
rm /var/run/sendmail.pid
fi
if [ "$RELAY" = "none" ]; then
MODE=background
QUEUE_RUN="-q5m"
RELAY=""
elif [ "$RELAY" = "queue" ]; then
MODE=deferred
QUEUE_RUN=""
RELAY="smtp:${DEFAULT_RELAY}"
else
MODE=background
QUEUE_RUN="-q5m"
RELAY="smtp:$RELAY"
fi
sed -e "s/^DS.*\$/DS$RELAY/" \
-e "s/^O DeliveryMode=.*\$/O DeliveryMode=$MODE/" \
<$SENDMAIL_CONFFILE >$SENDMAIL_CONFFILE.N
# Make a backup copy
mv -f $SENDMAIL_CONFFILE $SENDMAIL_CONFFILE.whereami
mv $SENDMAIL_CONFFILE.N $SENDMAIL_CONFFILE
`which sendmail` -bd $QUEUE_RUN
fi
if [ -f $POSTFIX_CONFFILE ] ; then
if [ "$RELAY" = "none" ]; then
DEFER=""
DISABLE_LOOKUPS="no"
RELAY=""
elif [ "$RELAY" = "queue" ]; then
DEFER="smtp"
DISABLE_LOOKUPS="yes"
RELAY="$DEFAULT_RELAY"
else
DEFER=""
DISABLE_LOOKUPS="yes"
MODE=background
RELAY="$RELAY"
fi
# Add paramters to config file if they do not exist
check_for_parameter $POSTFIX_CONFFILE "defer_transports"
check_for_parameter $POSTFIX_CONFFILE "disable_dns_lookups"
check_for_parameter $POSTFIX_CONFFILE "relayhost"
sed -e "s/^defer_transports *=.*\$/defer_transports=$DEFER/" \
-e "s/^disable_dns_lookups *=.*\$/disable_dns_lookups=$DISABLE_LOOKUPS/" \
-e "s/^relayhost *=.*\$/relayhost=$RELAY/" \
< $POSTFIX_CONFFILE > $POSTFIX_CONFFILE.N
# Make a backup copy
mv -f $POSTFIX_CONFFILE $POSTFIX_CONFFILE.whereami
mv $POSTFIX_CONFFILE.N $POSTFIX_CONFFILE
# Reload config
/etc/init.d/postfix reload
if [ "$RELAY" != "queue" ]; then
# Run mail queue
/etc/init.d/postfix flush
fi
fi
if [ -f $EXIM_CONFFILE ] ; then
if [ "$RELAY" = "none" ]; then
DEFER="# queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
elif [ "$RELAY" = "queue" ]; then
DEFER="queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
else
DEFER="# queue_remote_domains = *"
RELAY="$RELAY"
fi
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > On Wed, 2002-10-30 at 08:48, Derek Broughton wrote: > > > > > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > > > > > I'm playing around with whereami, looks really good! I'll look into the > > > > docking/undocking later and first see if I can get it to work properly > > > > in a simple case (two networks, both DHCP, setting mail relay and > > > > network mounts). Browsing through the "setmailrelay" suggests that it > > > > is written for either Sendmail or Postfix, is that correct or does it > > > > also work with Exim? > > > > > > Correct - I haven't had any Exim users itchy enough to send me the > > > details of what is required so far. I used to use sendmail, but I use > > > masqmail at the moment, so there is also integration with that. > > > > It shouldn't be an issue. Exim should install itself _as_ sendmail. So > > anything you can do with Sendmail should work. > > Unfortunately it isn't quite that straightforward. The setmailrelay > script needs to update the configuration file for exim, make changes so > that mail is relayed differently, and then restart it. > > It isn't _hard_ but Exim isn't compatible with sendmail at the > configuration file level, unless I miss my guess. oh... 'fraid so. The Exim configuration is, imo, a whole lot simpler - but that doesn't mean applying config changes for sendmail is going to work :-) Having opened my mouth when I shouldn't, I'll take a look at setmailrelay and see what it would need to work with Exim :-) derek
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > On Wed, 2002-10-30 at 08:48, Derek Broughton wrote: > > > > > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > > > > > I'm playing around with whereami, looks really good! I'll look into the > > > > docking/undocking later and first see if I can get it to work properly > > > > in a simple case (two networks, both DHCP, setting mail relay and > > > > network mounts). Browsing through the "setmailrelay" suggests that it > > > > is written for either Sendmail or Postfix, is that correct or does it > > > > also work with Exim? > > > > > > Correct - I haven't had any Exim users itchy enough to send me the > > > details of what is required so far. I used to use sendmail, but I use > > > masqmail at the moment, so there is also integration with that. > > > > It shouldn't be an issue. Exim should install itself _as_ sendmail. So > > anything you can do with Sendmail should work. > > Unfortunately it isn't quite that straightforward. The setmailrelay > script needs to update the configuration file for exim, make changes so > that mail is relayed differently, and then restart it. > > It isn't _hard_ but Exim isn't compatible with sendmail at the > configuration file level, unless I miss my guess. oh... 'fraid so. The Exim configuration is, imo, a whole lot simpler - but that doesn't mean applying config changes for sendmail is going to work :-) Having opened my mouth when I shouldn't, I'll take a look at setmailrelay and see what it would need to work with Exim :-) derek -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
On Wed, 2002-10-30 at 08:48, Derek Broughton wrote: > > > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > > > I'm playing around with whereami, looks really good! I'll look into the > > > docking/undocking later and first see if I can get it to work properly > > > in a simple case (two networks, both DHCP, setting mail relay and > > > network mounts). Browsing through the "setmailrelay" suggests that it > > > is written for either Sendmail or Postfix, is that correct or does it > > > also work with Exim? > > > > Correct - I haven't had any Exim users itchy enough to send me the > > details of what is required so far. I used to use sendmail, but I use > > masqmail at the moment, so there is also integration with that. > > It shouldn't be an issue. Exim should install itself _as_ sendmail. So > anything you can do with Sendmail should work. Hi Derek, Unfortunately it isn't quite that straightforward. The setmailrelay script needs to update the configuration file for exim, make changes so that mail is relayed differently, and then restart it. It isn't _hard_ but Exim isn't compatible with sendmail at the configuration file level, unless I miss my guess. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ -
Re: How to manager different network environments?
On Wed, 2002-10-30 at 08:48, Derek Broughton wrote: > > > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > > > I'm playing around with whereami, looks really good! I'll look into the > > > docking/undocking later and first see if I can get it to work properly > > > in a simple case (two networks, both DHCP, setting mail relay and > > > network mounts). Browsing through the "setmailrelay" suggests that it > > > is written for either Sendmail or Postfix, is that correct or does it > > > also work with Exim? > > > > Correct - I haven't had any Exim users itchy enough to send me the > > details of what is required so far. I used to use sendmail, but I use > > masqmail at the moment, so there is also integration with that. > > It shouldn't be an issue. Exim should install itself _as_ sendmail. So > anything you can do with Sendmail should work. Hi Derek, Unfortunately it isn't quite that straightforward. The setmailrelay script needs to update the configuration file for exim, make changes so that mail is relayed differently, and then restart it. It isn't _hard_ but Exim isn't compatible with sendmail at the configuration file level, unless I miss my guess. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > I'm playing around with whereami, looks really good! I'll look into the > > docking/undocking later and first see if I can get it to work properly > > in a simple case (two networks, both DHCP, setting mail relay and > > network mounts). Browsing through the "setmailrelay" suggests that it > > is written for either Sendmail or Postfix, is that correct or does it > > also work with Exim? > > Correct - I haven't had any Exim users itchy enough to send me the > details of what is required so far. I used to use sendmail, but I use > masqmail at the moment, so there is also integration with that. It shouldn't be an issue. Exim should install itself _as_ sendmail. So anything you can do with Sendmail should work. derek
Re: How to manager different network environments?
On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > I'm playing around with whereami, looks really good! I'll look into the > docking/undocking later and first see if I can get it to work properly > in a simple case (two networks, both DHCP, setting mail relay and > network mounts). Browsing through the "setmailrelay" suggests that it > is written for either Sendmail or Postfix, is that correct or does it > also work with Exim? Correct - I haven't had any Exim users itchy enough to send me the details of what is required so far. I used to use sendmail, but I use masqmail at the moment, so there is also integration with that. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ -
Re: How to manager different network environments?
Hi Andrew, I'm playing around with whereami, looks really good! I'll look into the docking/undocking later and first see if I can get it to work properly in a simple case (two networks, both DHCP, setting mail relay and network mounts). Browsing through the "setmailrelay" suggests that it is written for either Sendmail or Postfix, is that correct or does it also work with Exim? Excellent idea about the proxy, hadn't thought of that possibility yet but I will definately try to set it up like that. Auke On Mon, 2002-10-28 at 20:06, Andrew McMillan wrote: > > If linux supports docking / undocking your laptop then whereami can deal > with it. > > Some years ago (when I first developed whereami) I used to have a laptop > with a docking station, but use of the docking station required > rebooting so I have not bothered with one for my newer laptop. In those > days I used a test based on lspci and grep to look for some particular > PCI details only present in the docking station. This is handled as: > testpci > in recent versions. > > Configuring outgoing mailserver, starting and stopping services and > mounting / unmounting drives is all normal work for whereami. > > To date I have not had to deal with your proxy issues myself. I have > thought about it though, and concluded that the best way to do this > would probably be to run a local proxy, and reconfigure that to either > go direct to the internet, or to an upstream proxy. Otherwise there are > applications that need reconfiguring individually - it is much easier to > reconfigure a daemon process on the fly. > > Regards, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ signature.asc Description: This is a digitally signed message part
Re: How to manager different network environments?
From: "Andrew McMillan" <[EMAIL PROTECTED]> > On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > > > I'm playing around with whereami, looks really good! I'll look into the > > docking/undocking later and first see if I can get it to work properly > > in a simple case (two networks, both DHCP, setting mail relay and > > network mounts). Browsing through the "setmailrelay" suggests that it > > is written for either Sendmail or Postfix, is that correct or does it > > also work with Exim? > > Correct - I haven't had any Exim users itchy enough to send me the > details of what is required so far. I used to use sendmail, but I use > masqmail at the moment, so there is also integration with that. It shouldn't be an issue. Exim should install itself _as_ sendmail. So anything you can do with Sendmail should work. derek -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
On Wed, 2002-10-30 at 07:58, Auke Jilderda wrote: > > I'm playing around with whereami, looks really good! I'll look into the > docking/undocking later and first see if I can get it to work properly > in a simple case (two networks, both DHCP, setting mail relay and > network mounts). Browsing through the "setmailrelay" suggests that it > is written for either Sendmail or Postfix, is that correct or does it > also work with Exim? Correct - I haven't had any Exim users itchy enough to send me the details of what is required so far. I used to use sendmail, but I use masqmail at the moment, so there is also integration with that. Cheers, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
Hi Andrew, I'm playing around with whereami, looks really good! I'll look into the docking/undocking later and first see if I can get it to work properly in a simple case (two networks, both DHCP, setting mail relay and network mounts). Browsing through the "setmailrelay" suggests that it is written for either Sendmail or Postfix, is that correct or does it also work with Exim? Excellent idea about the proxy, hadn't thought of that possibility yet but I will definately try to set it up like that. Auke On Mon, 2002-10-28 at 20:06, Andrew McMillan wrote: > > If linux supports docking / undocking your laptop then whereami can deal > with it. > > Some years ago (when I first developed whereami) I used to have a laptop > with a docking station, but use of the docking station required > rebooting so I have not bothered with one for my newer laptop. In those > days I used a test based on lspci and grep to look for some particular > PCI details only present in the docking station. This is handled as: > testpci > in recent versions. > > Configuring outgoing mailserver, starting and stopping services and > mounting / unmounting drives is all normal work for whereami. > > To date I have not had to deal with your proxy issues myself. I have > thought about it though, and concluded that the best way to do this > would probably be to run a local proxy, and reconfigure that to either > go direct to the internet, or to an upstream proxy. Otherwise there are > applications that need reconfiguring individually - it is much easier to > reconfigure a daemon process on the fly. > > Regards, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ signature.asc Description: This is a digitally signed message part
Re: How to manager different network environments?
On Tue, 2002-10-29 at 07:29, Auke Jilderda wrote: > Andrew, > > I have exactly the same issue as Mariano and judging from the website, > "whereami" is 'exactly what the doctor ordered' ;-). > > On the site, it says: > My feeling is that there are only a few actual times when a > laptop might find itself in a new 'location': during the boot > process, and when a PCMCIA (network) card is inserted or > removed. > I'd say there is one more: Upon (un)docking. > > I am not yet very familiar with laptops because I just got my first one > a days ago but I'm learning: In the docking station, I seem to get a > second ethernet adapter so that should be easy detectable? However, I > haven't tested yet what happens if I boot before docking; I'm not sure > if the system will update its PCI devices info. > > Anyway, in addition to (de)configuring adapters, I need to > - (un)set a proxy for all network traffic > - configure the proper outgoing mailserver > - start and stop services (e.g. nfs, fetchmail) > - mount/unmount some drives > Can that be done with "whereami"? And, if so, do you have examples? > > Ofcourse it would also be very nice if you have links to similar > packages, if only to see your competition. ;-) If linux supports docking / undocking your laptop then whereami can deal with it. Some years ago (when I first developed whereami) I used to have a laptop with a docking station, but use of the docking station required rebooting so I have not bothered with one for my newer laptop. In those days I used a test based on lspci and grep to look for some particular PCI details only present in the docking station. This is handled as: testpci in recent versions. Configuring outgoing mailserver, starting and stopping services and mounting / unmounting drives is all normal work for whereami. To date I have not had to deal with your proxy issues myself. I have thought about it though, and concluded that the best way to do this would probably be to run a local proxy, and reconfigure that to either go direct to the internet, or to an upstream proxy. Otherwise there are applications that need reconfiguring individually - it is much easier to reconfigure a daemon process on the fly. Regards, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ -
Re: How to manager different network environments?
Andrew, I have exactly the same issue as Mariano and judging from the website, "whereami" is 'exactly what the doctor ordered' ;-). On the site, it says: My feeling is that there are only a few actual times when a laptop might find itself in a new 'location': during the boot process, and when a PCMCIA (network) card is inserted or removed. I'd say there is one more: Upon (un)docking. I am not yet very familiar with laptops because I just got my first one a days ago but I'm learning: In the docking station, I seem to get a second ethernet adapter so that should be easy detectable? However, I haven't tested yet what happens if I boot before docking; I'm not sure if the system will update its PCI devices info. Anyway, in addition to (de)configuring adapters, I need to - (un)set a proxy for all network traffic - configure the proper outgoing mailserver - start and stop services (e.g. nfs, fetchmail) - mount/unmount some drives Can that be done with "whereami"? And, if so, do you have examples? Ofcourse it would also be very nice if you have links to similar packages, if only to see your competition. ;-) Auke On Mon, 2002-10-28 at 01:19, Andrew McMillan wrote: > > This is exactly the sort of mess that 'whereami' is meant to handle, > first through detecting the situation and second through reconfiguring > services to suit that location. > > There are a bunch of other tools in Debian as well, but I naturally > recommend my own one :-) > > I personally connect regularly to about 10 different LANs - only one of > which is Wireless, most provide DHCP and some require fixed IP > addresses. Once I have 'whereami' configured for each new location I > simply open the lid on my laptop and it all 'just works'. > > Regards, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ signature.asc Description: This is a digitally signed message part
Re: How to manager different network environments?
On Tue, 2002-10-29 at 07:29, Auke Jilderda wrote: > Andrew, > > I have exactly the same issue as Mariano and judging from the website, > "whereami" is 'exactly what the doctor ordered' ;-). > > On the site, it says: > My feeling is that there are only a few actual times when a > laptop might find itself in a new 'location': during the boot > process, and when a PCMCIA (network) card is inserted or > removed. > I'd say there is one more: Upon (un)docking. > > I am not yet very familiar with laptops because I just got my first one > a days ago but I'm learning: In the docking station, I seem to get a > second ethernet adapter so that should be easy detectable? However, I > haven't tested yet what happens if I boot before docking; I'm not sure > if the system will update its PCI devices info. > > Anyway, in addition to (de)configuring adapters, I need to > - (un)set a proxy for all network traffic > - configure the proper outgoing mailserver > - start and stop services (e.g. nfs, fetchmail) > - mount/unmount some drives > Can that be done with "whereami"? And, if so, do you have examples? > > Ofcourse it would also be very nice if you have links to similar > packages, if only to see your competition. ;-) If linux supports docking / undocking your laptop then whereami can deal with it. Some years ago (when I first developed whereami) I used to have a laptop with a docking station, but use of the docking station required rebooting so I have not bothered with one for my newer laptop. In those days I used a test based on lspci and grep to look for some particular PCI details only present in the docking station. This is handled as: testpci in recent versions. Configuring outgoing mailserver, starting and stopping services and mounting / unmounting drives is all normal work for whereami. To date I have not had to deal with your proxy issues myself. I have thought about it though, and concluded that the best way to do this would probably be to run a local proxy, and reconfigure that to either go direct to the internet, or to an upstream proxy. Otherwise there are applications that need reconfiguring individually - it is much easier to reconfigure a daemon process on the fly. Regards, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: How to manager different network environments?
Andrew, I have exactly the same issue as Mariano and judging from the website, "whereami" is 'exactly what the doctor ordered' ;-). On the site, it says: My feeling is that there are only a few actual times when a laptop might find itself in a new 'location': during the boot process, and when a PCMCIA (network) card is inserted or removed. I'd say there is one more: Upon (un)docking. I am not yet very familiar with laptops because I just got my first one a days ago but I'm learning: In the docking station, I seem to get a second ethernet adapter so that should be easy detectable? However, I haven't tested yet what happens if I boot before docking; I'm not sure if the system will update its PCI devices info. Anyway, in addition to (de)configuring adapters, I need to - (un)set a proxy for all network traffic - configure the proper outgoing mailserver - start and stop services (e.g. nfs, fetchmail) - mount/unmount some drives Can that be done with "whereami"? And, if so, do you have examples? Ofcourse it would also be very nice if you have links to similar packages, if only to see your competition. ;-) Auke On Mon, 2002-10-28 at 01:19, Andrew McMillan wrote: > > This is exactly the sort of mess that 'whereami' is meant to handle, > first through detecting the situation and second through reconfiguring > services to suit that location. > > There are a bunch of other tools in Debian as well, but I naturally > recommend my own one :-) > > I personally connect regularly to about 10 different LANs - only one of > which is Wireless, most provide DHCP and some require fixed IP > addresses. Once I have 'whereami' configured for each new location I > simply open the lid on my laptop and it all 'just works'. > > Regards, > Andrew. -- PGP: 0x4A34DD6D, http://bunny.sourceforge.net/ signature.asc Description: This is a digitally signed message part
Re: How to manager different network environments?
On Mon, 2002-10-28 at 12:35, Mariano Kamp wrote: > Hi All, > > I am using woody with a Sony Vaio utilizing a WLAN card. Sometimes I > use my laptop in a LAN which I access via Ethernet and the next day with > WLAN. On a client side I cannot use dhcp, but have to use a fixed IP. On > two other sites I use wlan, but with different passwords. > > What can I do to handle this mess? > > One thing I found is that when my WLAN Card is inserted the cardmgr > issues a ./network start eth1 (my WLAN card), which is nice, but in an > environment where I use the same IP/Routing etc. via Ethernet (fixed > line) and WLAN it is not very helpful without shutting down eth0 first. > > How can I change the current behaviour? I'd like to call a shutdown to > eth0 if eth0 and eth1 are configured in the same way. I don't want to do > that if they are different. > > When starting up debian it asks me in which network environment I want > to work. What is that good for? If I could select where I am going to > connect this time would it solve my problem, but afaik it the mechanism > will just be able to manage different ip addresses, doesn't it? This is exactly the sort of mess that 'whereami' is meant to handle, first through detecting the situation and second through reconfiguring services to suit that location. There are a bunch of other tools in Debian as well, but I naturally recommend my own one :-) I personally connect regularly to about 10 different LANs - only one of which is Wireless, most provide DHCP and some require fixed IP addresses. Once I have 'whereami' configured for each new location I simply open the lid on my laptop and it all 'just works'. Regards, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ -
Re: How to manager different network environments?
On Mon, 2002-10-28 at 12:35, Mariano Kamp wrote: > Hi All, > > I am using woody with a Sony Vaio utilizing a WLAN card. Sometimes I > use my laptop in a LAN which I access via Ethernet and the next day with > WLAN. On a client side I cannot use dhcp, but have to use a fixed IP. On > two other sites I use wlan, but with different passwords. > > What can I do to handle this mess? > > One thing I found is that when my WLAN Card is inserted the cardmgr > issues a ./network start eth1 (my WLAN card), which is nice, but in an > environment where I use the same IP/Routing etc. via Ethernet (fixed > line) and WLAN it is not very helpful without shutting down eth0 first. > > How can I change the current behaviour? I'd like to call a shutdown to > eth0 if eth0 and eth1 are configured in the same way. I don't want to do > that if they are different. > > When starting up debian it asks me in which network environment I want > to work. What is that good for? If I could select where I am going to > connect this time would it solve my problem, but afaik it the mechanism > will just be able to manage different ip addresses, doesn't it? This is exactly the sort of mess that 'whereami' is meant to handle, first through detecting the situation and second through reconfiguring services to suit that location. There are a bunch of other tools in Debian as well, but I naturally recommend my own one :-) I personally connect regularly to about 10 different LANs - only one of which is Wireless, most provide DHCP and some require fixed IP addresses. Once I have 'whereami' configured for each new location I simply open the lid on my laptop and it all 'just works'. Regards, Andrew. -- - Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267 Survey for free with http://survey.net.nz/ - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

