Changeset 27977 for branches/backfire


Ignore:
Timestamp:
2011-08-14T01:20:03+02:00 (5 years ago)
Author:
jow
Message:

[backfire] backport r27720

Location:
branches/backfire/package/base-files
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/base-files/Makefile

    r27966 r27977  
    1111 
    1212PKG_NAME:=base-files 
    13 PKG_RELEASE:=43.26 
     13PKG_RELEASE:=43.27 
    1414 
    1515PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
  • branches/backfire/package/base-files/files/sbin/ifdown

    r21639 r27977  
    11#!/bin/sh 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33 
    44. /etc/functions.sh 
    55[ $# = 0 ] && { echo "  $0 <group>"; exit; } 
    6 [ "x$1" = "x-a" ] && { 
    7         [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto 
    8         config_cb() { 
    9                 [ interface != "$1" -o -z "$2" ] || eval "$0 $2" 
    10         } 
    11         config_load network 
    12         exit 
    13 } 
     6 
     7case "$1" in 
     8        "-a") 
     9                [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto 
     10                config_cb() { 
     11                        [ interface != "$1" -o -z "$2" ] || eval "$0 -w $2" 
     12                } 
     13                config_load network 
     14                exit 0 
     15        ;; 
     16        "-w") shift ;; 
     17esac 
    1418 
    1519include /lib/network 
  • branches/backfire/package/base-files/files/sbin/ifup

    r27133 r27977  
    66. /etc/functions.sh 
    77[ $# = 0 ] && { echo "  $0 <group>"; exit; } 
    8 [ "x$1" = "x-a" ] && { 
    9         [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto 
    10         config_cb() { 
    11                 [ interface != "$1" -o -z "$2" ] || eval "$0 $2" 
     8 
     9setup_wifi=1 
     10 
     11case "$1" in 
     12        "-a") 
     13                [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto 
     14                config_cb() { 
     15                        [ interface != "$1" -o -z "$2" ] || eval "$0 -w $2" 
     16                } 
     17                config_load network 
     18                exit 0 
     19        ;; 
     20        "-w") setup_wifi=0; shift ;; 
     21esac 
     22 
     23if [ $setup_wifi -gt 0 ] && grep -q config /etc/config/wireless; then 
     24        find_related_radios() { 
     25                local wdev wnet 
     26                config_get wdev "$1" device 
     27                config_get wnet "$1" network 
     28 
     29                if [ -n "$wdev" ] && [ "$wnet" = "$network" ]; then 
     30                        append radio_devs "$wdev" "$N" 
     31                fi 
    1232        } 
    13         config_load network 
    14         exit 
    15 } 
     33 
     34        local radio_devs 
     35        local network="$1" 
     36        config_load wireless 
     37        config_foreach find_related_radios wifi-iface 
     38 
     39        local dev 
     40        for dev in $(echo "$radio_devs" | sort -u); do 
     41                /sbin/wifi up "$dev" 
     42        done 
     43fi 
    1644 
    1745include /lib/network 
Note: See TracChangeset for help on using the changeset viewer.