Changeset 21386


Ignore:
Timestamp:
2010-05-06T03:14:24+02:00 (8 years ago)
Author:
jow
Message:

[package] base-files, ppp: fix interface shutdown

Location:
trunk/package
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/lib/network/config.sh

    r21383 r21386  
    334334 
    335335        local iface 
    336         config_get iface "$config" iface 
    337  
    338         local lock="/var/lock/dhcp-${iface}" 
     336        config_get ifname "$config" ifname 
     337 
     338        local lock="/var/lock/dhcp-${ifname}" 
    339339        [ -f "$lock" ] && lock -u "$lock" 
    340340 
    341         local pidfile="/var/run/dhcp-${iface}.pid" 
     341        local pidfile="/var/run/dhcp-${ifname}.pid" 
    342342        local pid="$(cat "$pidfile" 2>/dev/null)" 
    343343        [ -d "/proc/$pid" ] && { 
  • trunk/package/ppp/files/ppp.sh

    r21383 r21386  
    88        config_get ifname "$cfg" ifname 
    99 
    10         local link="${proto:-ppp}-$ifname" 
    11         [ -f "/var/run/ppp-${link}.pid" ] && { 
    12                 local pid="$(head -n1 /var/run/ppp-${link}.pid 2>/dev/null)" 
     10        [ -f "/var/run/ppp-${ifname}.pid" ] && { 
     11                local pid="$(head -n1 /var/run/ppp-${ifname}.pid 2>/dev/null)" 
    1312                grep -qs pppd "/proc/$pid/cmdline" && kill -TERM $pid && \ 
    1413                        while grep -qs pppd "/proc/$pid/cmdline"; do sleep 1; done 
    15                 rm -f "/var/run/ppp-${link}.pid" 
     14                rm -f "/var/run/ppp-${ifname}.pid" 
    1615        } 
    1716 
    18         local lock="/var/lock/ppp-$link" 
     17        local lock="/var/lock/ppp-$ifname" 
    1918        [ -f "$lock" ] && lock -u "$lock" 
    2019} 
Note: See TracChangeset for help on using the changeset viewer.