Re: Activating/deactivating a network interface
Re: Activating/deactivating a network interface
- Subject: Re: Activating/deactivating a network interface
- From: Justin Walker <email@hidden>
- Date: Fri, 6 Feb 2004 07:40:57 -0800
On Friday, February 6, 2004, at 05:28 AM, Jirome Foucher wrote:
On 6 fivr. 04, at 13:38, Quinn wrote:
At 10:01 +0100 6/2/04, Jirome Foucher wrote:
Is it better on OS X to use MoreSCF to mark interfaces as
__INACTIVE__ ?
It depends on your goal. MoreSCF works on the user's persistent
network preferences. Once you commit your change to the preferences,
the SCF infrastructure applies that change to the currently running
network stack. If you want your changes to be persistent, MoreSCF is
definitely the way to go.
OTOH, if you want your changes to be transient (for example, you want
to take the interface down temporarily, twiddle a parameter, and
bring it straight back up again), there may be better solutions. If
you explain some background to this requirement we may be able to
suggest a better solution.
The change will not be permanent.
It's for use in a kiosk computer.
When the computer is idle, it just displays a demo movie. During that
time, we want to close all the interfaces for security reasons.
When someone inserts a card to start an internet session, we want to
reactivate the interface to let the user browse.
ifconfig seemed a nice solution for that purpose, without any need to
reconfigure everything.
Since you can use 'ifconfig', it appears you are using shell scripts of
some sort. You can also try 'scselect', which is a command-line tool
that lets you switch 'locations'. Define a "disconnected" location
that disables the ports you want turned off. Then you can use scselect
to switch between your "active" location and "disconnected". Using
'scselect' will keep things working as you expect, since it is hooked
into the same frameworks that MoreSCF would use.
A caveat: 'scselect' uses numerical keys to specify locations, so you
have to be a bit careful in your script. 'scselect' with no arguments
lists the choices, with numerical keys.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Some people have a mental
| horizon of radius zero, and
| call it their point of view.
| -- David Hilbert
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.