Ignore:
Timestamp:
2011-11-08T23:48:05+01:00 (4 years ago)
Author:
nico
Message:

package/ppp: use new service wrappers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/ppp/files/ppp.sh

    r28364 r28868  
    66 
    77        local link="$proto-$cfg" 
    8         service_kill pppd "/var/run/ppp-${link}.pid" 
     8        SERVICE_PID_FILE="/var/run/ppp-${link}.pid" \ 
     9        service_stop /usr/sbin/pppd 
    910 
    1011        remove_dns "$cfg" 
     
    3233        # make sure only one pppd process is started 
    3334        lock "/var/lock/ppp-${link}" 
    34         local pid="$(head -n1 /var/run/ppp-${link}.pid 2>/dev/null)" 
    35         [ -d "/proc/$pid" ] && grep pppd "/proc/$pid/cmdline" 2>/dev/null >/dev/null && { 
     35        SERVICE_PID_FILE="/var/run/ppp-${link}.pid" \ 
     36        service_check /usr/sbin/ppd && { 
    3637                lock -u "/var/lock/ppp-${link}" 
    3738                return 0 
     
    106107        [ "$ipv6" -eq 1 ] && ipv6="+ipv6" || ipv6="" 
    107108 
    108         start-stop-daemon -S -b -x /usr/sbin/pppd -m -p /var/run/ppp-$link.pid -- "$@" \ 
     109        SERVICE_DAEMONIZE=1 \ 
     110        SERVICE_WRITE_PID=1 \ 
     111        SERVICE_PID_FILE="/var/run/ppp-$link.pid" \ 
     112        service_start /usr/sbin/pppd "$@" \ 
    109113                ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \ 
    110114                $demandargs \ 
Note: See TracChangeset for help on using the changeset viewer.