Re: nm-system-settings problem



On Fri, 2008-05-09 at 18:22 -0400, Gene Czarcinski wrote:
> On Friday 09 May 2008 11:11:51 Gene Czarcinski wrote:
> > I have reported a problem with
> > system-settings/plugins/ifcfg-fedora/plugin.c not detecting changes made by
> > system-config-network because the ifcfg file in
> > /etc/sysconfig/network-scripts/ is really a hardlink rather than the main
> > file.
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=444502
> >
> > Besides the "patch" I have outlined in the bug report (towards the end), it
> > appears that simply adding another int (wd2) to the SCPluginIfcfgPrivate
> > struct definition could be used to hold the value of hardlink's wd.
> >
> > I would appreciate more knowledgable eyes to take a look at the bug report
> > to see if the patch I have outlined makes sense.
> >
> > If this makes sense, I will cobble a patch together and submit it.
> 
> Yet more fooling around and testing.
> 
> I MAY have found a quick and simple fix:
> 
> In ifcfg-fedora/plugin.c around line 52, change:
> 
> #define IFCFG_DIR SYSCONFDIR"/sysconfig/network-scripts/"
> 
> to:
> 
> #define IFCFG_DIR SYSCONFDIR"/sysconfig/networking/devices/"
> 
> This change appears to put ifcfg-fedora/plugin.c in sync with
> system-config-network as the what the "real" file is being changed.  However,
> the whole business of hardlinks is being ignored stuff_changed() since evt.wd 
> is NOT the expected one.  What I have seen so far is the wd==1 for the 
> watched directory but wd>1 for hardlinks.  Since there can be multiple 
> devices defined, the value of wd can vary all over the place.
> 
> Now, the question is:  What does this change screw up???

Originally we did monitor /etc/sysconfig/networking/profiles/default
(which is one of the 3 hardlink locations) but many people expect to
change the files in /etc/sysconfig/network-scripts/ instead.  Not
everyone uses system-config-network evidently.

So this change will make the system settings service no longer recognize
direct changes to files in /etc/sysconfig/network-scripts/.

The actual solution is to fix the inotify bits to accurately track
changes to hardlinked files.

Dan



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