Re: where is the network "profile" script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


The /etc/rc.d/rc.sysinit script looks at the boot command line from
/proc and scans it looking for "netprofile=". If it finds it, it
invokes "/usr/sbin/system-config-network-cmd --profile" and hands it the
name of the profile you gave. The code starts at line 904 in
/etc/rc.d/rc.sysinit if you want to peruse it. As far as system-config-network-cmd goes, it's a python script. Have at it.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Make it idiot proof and someone will make a better idiot. -
----------------------------------------------------------------------



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux