script exited with error status 127

5,842

I can't comment, so I'll have to reply.

Error 127 means that either command used is not found or your script is not +x. More info from advanced bash-scripting guide at http://tldp.org/LDP/abs/html/exitcodes.html

Share:
5,842

Related videos on Youtube

Alireza
Author by

Alireza

Updated on September 18, 2022

Comments

  • Alireza
    Alireza over 1 year

    i wrote some scrip for setting route on specific interface on linux (CentOS 6.0) and put them into Networkmanager script path (/etc/Networkmanager/dispatcher.d) with highest prefix number.(i give execution permition too.)

    this is my script:

    #!/bin/bash
    
    if [[ "$1" == "eth1" ]] && [[ "$2" == "up" ]]
    then
        ip route add 192.XX.XX.0/24 dev eth1 src 192.XX.XX.XX table eth1
        #logger scrip run.
    fi
    

    but when eth1 is up i see this error on my syslog-message list:

    localhost nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/99-eth' exited with error status 127.
    

    can anyone say where is my mistake??