2 2

NetworkManger dispatcher problem

Recommended Posts

Hi all,

I am trying to have a script running when eth0 i s up, but it seems that I don't get it. Although I followed a guide and set anything, NM is not triggering my script.

So I have created my script without sh extension and called it 90-start-script in /etc/NetworkManager/dispatcher.d:

logger -s "I DON'T SEE THIS"
if [ "$1" == "eth0" ]; then
        case "$2" in

I gave it root ownership, execution flag, but it seems to be not working...


I followed this guide: https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher


I am running armbian 5.60 (strech)




Share this post

Link to post
Share on other sites

Did you take a look into /etc/NetworkManager/dispatcher.d directory to see how the other scripts do?

For example, I see that you miss the shebang at the very first lines of your script.


edit: also check the double equal (==) in the if statement. If I remember well, there should be a single equal there.

Share this post

Link to post
Share on other sites

I have checked already the other scripts but they are really different from what I have...I have seen many example, who is using the single = who ==

anyway I tried all combinations...it also has the first line #!/bin/bash that I have just skipped.

The strange thing is that not even the first line of code is executed, only when I restart NetworkManager!


Thanks for the reply


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2