blob: db1ba09656ed613bb325109a32cf3f40b2da6c93 [file] [log] [blame]
xf.li86118912025-03-19 20:07:27 -07001#!/bin/sh
2#
3# $Id: lan.sh
4#
5path_sh=`nv get path_sh`
6. $path_sh/global.sh
7
8pppd_auth=`nv get pppd_auth`
9dev_name=$1
10echo "name is $1"
11aa=`echo $dev_name | sed 's/\//\\\\\//g'`
12echo "aa is $aa"
13echo "Info:start pppd!" >> $test_log
14if [ "$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 &
22elif [ "$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 &
28fi