/[baselayout]/trunk/init.d/net.ppp0
Gentoo

Diff of /trunk/init.d/net.ppp0

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

Revision 350 Revision 351
25 if [ -e "/var/run/ppp-${IFACE}.pid" -a "${FUNCT}" = "start" ] 25 if [ -e "/var/run/ppp-${IFACE}.pid" -a "${FUNCT}" = "start" ]
26 then 26 then
27 eerror "ppp0 is already up" 27 eerror "ppp0 is already up"
28 return 1 28 return 1
29 fi 29 fi
30
31 if [ ! -e "/var/run/ppp-${IFACE}.pid" -a "${FUNCT}" = "stop" ]
32 then
33 eerror "ppp0 not up"
34
35 # Do our own cleanup
36 if [ -L ${svcdir}/started/net.${IFACE} ]
37 then
38 rm -f ${svcdir}/started/net.${IFACE}
39 fi
40
41 return 1
42 fi
43
44} 30}
45 31
46start() { 32start() {
47 33
48 checkconfig || return 1 34 checkconfig || return 1
75 then 61 then
76 62
77 if [ -z "$(/sbin/ifconfig | egrep "${IFACE}")" ] 63 if [ -z "$(/sbin/ifconfig | egrep "${IFACE}")" ]
78 then 64 then
79 eerror "Interface seems to be down already" 65 eerror "Interface seems to be down already"
66 # We should return 0 here, else svc_stop() will not remove
67 # the 'started' symlink ...
80 return 1 68 return 0
81 fi 69 fi
82 70
83# /sbin/ifconfig ${IFACE} down 71# /sbin/ifconfig ${IFACE} down
84 kill $(cat /var/run/ppp-${IFACE}.pid | egrep -v "${IFACE}") 72 kill $(cat /var/run/ppp-${IFACE}.pid | egrep -v "${IFACE}")
85 fi 73 fi

Legend:
Removed from v.350  
changed lines
  Added in v.351

  ViewVC Help
Powered by ViewVC 1.1.20