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??