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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

2 2