where is the network "profile" script?

John DeDourek dedourek at unb.ca
Thu Dec 2 01:25:20 UTC 2004


Trevor Smith wrote:

> I have network "profiles" set up, one for "Home" and one for "Dal" (Dal is an 
> abbreviation of the name of the university I attend), since there are 
> different wireless networks at both places and ... well, I can't really 
> remember why I set them up. But they work so I have left them set up.
> 
> Anyway, I noticed that when I select a network profile, one of the results is 
> that the /etc/hosts file gets replaced with a link to either:
> 
> /etc/sysconfig/networking/profiles/Home/hosts
> or
> /etc/sysconfig/networking/profiles/Dal/hosts
> 
> That seems sensible. This would imply, though, that somewhere on my system, a 
> script is run when I "change profiles" that replaces the hosts file with the 
> version in the other profile's directory. Can anyone tell me where that 
> script is?
> 
> What I would *like* to do is modify the script so that it also copies a new 
> sendmail.cf file and then restarts sendmail. Why? Because this would allow me 
> to send my emails through sendmail on *my* machine, which would send through 
> the correct SMTP server (my ISP's when I'm at home; my web hosting provider's 
> when I'm at school) whenever I selected one of the different profiles.
> 
> Why the heck would I want to bother? Mostly just curiousity now to see if it 
> can be done.
> 
Hi Trevor:

I've been looking at some other issues with respect to profiles.
Haven't gotten very far.  But as near as I understand it, it's
not done with shell scripts but rather with Python "scripts".
Unfortunately, I don't really read Python very well.  I think
that it is the "Python program"

/usr/share/system-config-network/netconf.py

along with other "programs" in that directory.  Note that
"Python" is a form of script (Python people don't shoot me!)
in the sense that these "programs" are ASCII text files
"executed" by the interpreter "/usr/bin/python".

John




More information about the fedora-list mailing list