Jump to content

NetworkManger dispatcher problem


AlterX

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
                up)
                ~/scripts/start_check.sh
                ;;
        esac
fi;

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)

 

Thanks

 

Link to comment
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.

Link to comment
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

Gianni

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines