xf.li | 8611891 | 2025-03-19 20:07:27 -0700 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # $Id: lan.sh |
| 4 | # |
| 5 | path_sh=`nv get path_sh` |
| 6 | . $path_sh/global.sh |
| 7 | |
| 8 | pppd_auth=`nv get pppd_auth` |
| 9 | dev_name=$1 |
| 10 | echo "name is $1" |
| 11 | aa=`echo $dev_name | sed 's/\//\\\\\//g'` |
| 12 | echo "aa is $aa" |
| 13 | echo "Info:start pppd!" >> $test_log |
| 14 | if [ "$pppd_auth" == "auth" ]; then |
| 15 | cp $path_ro/options.auth $path_conf/options |
| 16 | cp $path_ro/pap-secrets $path_conf/pap-secrets |
| 17 | cp $path_ro/chap-secrets $path_conf/chap-secrets |
| 18 | sed -i -e "s/#dev_name#/$aa/g" $path_conf/options |
| 19 | sed -i -e "s/#dev_name#/$aa/g" $path_conf/options |
| 20 | killall -9 pppd |
| 21 | pppd & |
| 22 | elif [ "$pppd_auth" == "noauth" ]; then |
| 23 | cp $path_ro/options.noauth $path_conf/options |
| 24 | sed -i -e "s/#dev_name#/$aa/g" $path_conf/options |
| 25 | sed -i -e "s/#dev_name#/$aa/g" $path_conf/options |
| 26 | killall -9 pppd |
| 27 | pppd & |
| 28 | fi |