Hello everybody!
Sorry for not perfect English.
Need help, I try to execute this script in /etc/ppp/auth-up:
It this file, $1 is interface name like ppp0, ppp1 etc
$2 is peer name (defined in /ppp/chap-secrets)
#Script start
!#/bin/sh
if [ "$2" == "someusername" ]; then
echo $1 >> /var/test
route add -net 192.168.x.x/24 dev $1
fi
After it, in shell
cat /var/test return values like ppp0, ppp1, and condition work, but route don't add.
T.y for any ideas.
Sorry for not perfect English.
Need help, I try to execute this script in /etc/ppp/auth-up:
It this file, $1 is interface name like ppp0, ppp1 etc
$2 is peer name (defined in /ppp/chap-secrets)
#Script start
!#/bin/sh
if [ "$2" == "someusername" ]; then
echo $1 >> /var/test
route add -net 192.168.x.x/24 dev $1
fi
After it, in shell
cat /var/test return values like ppp0, ppp1, and condition work, but route don't add.
T.y for any ideas.