You are not logged in.
I've tried putting various scripts in /etc/NetworkManager/dispatcher.d but none of them start after i've booted and a connection is established.
If i restart networkmanager with /etc/rc.d/networkmanager restart that does not work.
In my case, i'm trying to start openntpd with networkmanager's dispatcher. I am only able to start openntpd manually with /etc/rc.d/openntpd start, but not with the dispatcher. My time is always messed up unless i start openntpd manually.
This is the script i've put in /etc/NetworkManager/dispatcher.d/20_openntpd:
#!/bin/sh
INTERFACE=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface
case "$STATUS" in
'up') # $INTERFACE is up
exec /etc/rc.d/openntpd start
;;
'down') # $INTERFACE is down
exec /etc/rc.d/openntpd stop # Disable if having more than one active interface might bring ntpd down unnecessarily
;;
esac
It should start openntpd when networkmanager gets connected at boot up, right?
Well, nothing appears to happen.
Any ideas? And thanks for looking!
Last edited by trusktr (2010-09-22 05:48:08)
joe@trusktr.io - joe at true skater dot io.
Offline
I haven't been able to make it work yet, but also I think it's Windows messing up my time... Everytime the hardware clock and system clock is set correctly in Arch, then my Windows system time is horribly off the next time i log into windows.
Let's see if there's a fix...
joe@trusktr.io - joe at true skater dot io.
Offline
Mmmmm... I really don't know how to use the networkmanager dispatcher, but as I can understand, you would like openntpd to be executed at startup time right? Couldn't use the autostart feature of your desktop environment instead of networkmanager? I know that this does not solve the NM problem and that is not a so refined way for handling the problem as the one using the nm dispatcher script, but could be a fixture in any case!
Offline
just trowing some ideas, did you do chmod +x /etc/NetworkManager/dispatcher.d/20_openntpd ?
Give what you have. To someone, it may be better than you dare to think.
Offline
True that, @xaber. I thought of just settling with that. But it's bugging me knowing that it isn't working! hehe.
Let me try that @wonder. Maybe you're right!
joe@trusktr.io - joe at true skater dot io.
Offline
Aha! Indeed that solved the problem. Thanks @wonder. I'll definitely think of that next time i encounter such a problem.
EDIT: That piece of info is missing from the wiki so I'm adding it.
Last edited by trusktr (2010-09-22 05:43:30)
joe@trusktr.io - joe at true skater dot io.
Offline
Off-topic observation: you say the info is missing from the wiki - others, possibly including the article's author, might reasonably assume that any Archer writing a script that starts with "#!/bin/sh" already knows that it should be made executable.
Offline
That could be very true, tomk. It'll just serve as a useful sidenote. It had me stuck for a good while.
Last edited by trusktr (2010-09-22 07:26:40)
joe@trusktr.io - joe at true skater dot io.
Offline
True that, @xaber. I thought of just settling with that. But it's bugging me knowing that it isn't working! hehe.
Let me try that @wonder. Maybe you're right!
I really can understand what you mean! Anyway, I'm happy you solved the problem: many times the solution is just a few centimetres far!
Offline
Indeed, this is true. It has happened a couple times already!
joe@trusktr.io - joe at true skater dot io.
Offline