Re: if-up hooks not working



On Fri, 2007-11-30 at 21:58 -0600, Scott Severance wrote:
> On 11/30/07, Darren Albers <dalbers gmail com> wrote:
> >
> > On Fri, 2007-11-30 at 14:33 -0600, Scott Severance wrote:
> > > snip
> > >
> > > > > > After poking around the filesystem and NetworkManager's scanty
> > > > > > documentation, I determined that I should place my script in
> > > > > > /etc/network/if-up.d. However, I've discovered that those scripts
> > > > get called
> > > > > > when switching from wireless to wired, but not the other way
> > > > around. How can
> > > > > > I persuade NetworkManager to run my script *every* time it
> > > > switches
> > > > > > interfaces?
> > > snip
> > > > Thanks for the reply. I gather from the NetworkManagerDispatcher man
> > > > page that I should put my script in /etc/NetworkManager/dispatcher.d
> > > > and modify it so it only runs when the second command line argument is
> > > > "up." However, in its new location the script never gets executed.
> > > > What's even more confusing is that, apparently the only reason the
> > > > script worked at all in /etc/network/if- up.d was because there's a
> > > > script in /etc/NetworkManager/dispatcher.d which calls run-parts on
> > > > the other directory. Why isn't NetworkManagerDispatcher running my
> > > > script?
> > > After rebooting the computer in question as well as my server because
> > > NFS was acting up, my script now seems to get run reliably if I put it
> > > in /etc/network/if-up.d. However, contrary to the docs, the only script
> > > in /etc/NetworkManager/dispatcher.d that ever gets executed is
> > > 01ifupdown. Since that script calls run-parts on /etc/network/if-up.d,
> > > My script gets executed in that directory.
> > >
> > > Is the NetworkManagerDispatcher man page wrong, or am I experiencing
> > > some kind of bug?
> > >
> > > By the way, I'm running Ubuntu Gutsy.
> >
> > Is the script only owned by root and executable?   Do you see the script
> > execute when you tail syslog?
> >
> The script is owned by myuser:root, with 770 permissions. I chowned to
> root:root, but it didn't make any difference. One reason that I know
> it isn't running is because the script logs several messages to
> syslog, and those messages don't show up. NetworkManagerDispatcher
> doesn't itself log the scripts it runs. So, the script definitely
> isn't executing.

I think the permissions need to be 0700 or 0500 and the file owned by
root.   I remember some messages on the list to that affect but I can't
seem to find them off-hand.




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