/[baselayout]/trunk/net.Linux/pppd.sh
Gentoo

Diff of /trunk/net.Linux/pppd.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2817 Revision 2818
23 if ${IN_BACKGROUND} ; then 23 if ${IN_BACKGROUND} ; then
24 local config= 24 local config=
25 eval config=\$config_${IFVAR} 25 eval config=\$config_${IFVAR}
26 # If no config for ppp then don't default to DHCP 26 # If no config for ppp then don't default to DHCP
27 if [ -z "${config}" ] ; then 27 if [ -z "${config}" ] ; then
28 eval config_${IFVAR}=\"null\" 28 eval config_${IFVAR}=null
29 fi 29 fi
30 return 0 30 return 0
31 fi 31 fi
32 32
33 local link= i= opts= unit="${IFACE#ppp}" mtu= 33 local link= i= opts= unit="${IFACE#ppp}" mtu=
55 fi 55 fi
56 56
57 eval $(_get_array "pppd_${IFVAR}") 57 eval $(_get_array "pppd_${IFVAR}")
58 opts="$@" 58 opts="$@"
59 59
60 local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersits=false 60 local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersist=false
61 local hasupdetach=false 61 local hasupdetach=false
62 for i in "$@" ; do 62 for i in "$@" ; do
63 set -- ${i} 63 set -- ${i}
64 case "$1" in 64 case "$1" in
65 unit|nodetach|linkname) 65 unit|nodetach|linkname)
68 ;; 68 ;;
69 mtu) hasmtu=true ;; 69 mtu) hasmtu=true ;;
70 mru) hasmru=true ;; 70 mru) hasmru=true ;;
71 maxfail) hasmaxfail=true ;; 71 maxfail) hasmaxfail=true ;;
72 persist) haspersist=true ;; 72 persist) haspersist=true ;;
73 updetach) hasupdetach=true; 73 updetach) hasupdetach=true ;;
74 esac 74 esac
75 done 75 done
76 76
77 # Might be set in conf.d/net 77 # Might be set in conf.d/net
78 local username= password= passwordset= 78 local username= password= passwordset=
79 eval username=\$username_${IFVAR} 79 eval username=\$username_${IFVAR}
80 eval password=\$password_${IFVAR} 80 eval password=\$password_${IFVAR}
81 eval passwordset=\${password_${IFVAR}-x} 81 eval passwordset=\$\{password_${IFVAR}-x\}
82 if [ -n "${username}" ] \ 82 if [ -n "${username}" ] \
83 && [ -n "${password}" -o -z "${passwordset}" ] ; then 83 && [ -n "${password}" -o -z "${passwordset}" ] ; then
84 opts="${opts} plugin passwordfd.so passwordfd 0" 84 opts="${opts} plugin passwordfd.so passwordfd 0"
85 fi 85 fi
86 86
87 if [ -n "${mtu}" ] ; then 87 if [ -n "${mtu}" ] ; then
88 ${hasmtu} || opts="${opts} mtu ${mtu}" 88 ${hasmtu} || opts="${opts} mtu ${mtu}"
89 ${hasmru} || opts="${opts} mru ${mtu}" 89 ${hasmru} || opts="${opts} mru ${mtu}"
90 fi 90 fi
91 ${hasmailfail} || opts="${opts} maxfail 0" 91 ${hasmaxfail} || opts="${opts} maxfail 0"
92 ${haspersist} || opts="${opts} persist" 92 ${haspersist} || opts="${opts} persist"
93 93
94 # Set linkname because we need /var/run/ppp-${linkname}.pid 94 # Set linkname because we need /var/run/ppp-${linkname}.pid
95 # This pidfile has the advantage of being there, 95 # This pidfile has the advantage of being there,
96 # even if ${IFACE} interface was never started 96 # even if ${IFACE} interface was never started

Legend:
Removed from v.2817  
changed lines
  Added in v.2818

  ViewVC Help
Powered by ViewVC 1.1.20