more fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7639 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
040caceff3
commit
171557a1c1
|
@ -106,7 +106,7 @@ do_show() {
|
||||||
SECTION=""
|
SECTION=""
|
||||||
|
|
||||||
config_cb() {
|
config_cb() {
|
||||||
if [ -z "$CONFIG" -o "$CONFIG" = "$2" ]; then
|
if [ -z "$CONFIG" -o ."$CONFIG" = ."$2" ]; then
|
||||||
append SECTION "$2"
|
append SECTION "$2"
|
||||||
option_cb() {
|
option_cb() {
|
||||||
append "${CONFIG_SECTION}_VARS" "$1"
|
append "${CONFIG_SECTION}_VARS" "$1"
|
||||||
|
|
|
@ -13,7 +13,7 @@ find_config() {
|
||||||
esac
|
esac
|
||||||
config_get device "$ifn" device
|
config_get device "$ifn" device
|
||||||
for ifc in $device $iface $ifaces; do
|
for ifc in $device $iface $ifaces; do
|
||||||
[ "$ifc" = "$1" ] && {
|
[ ."$ifc" = ."$1" ] && {
|
||||||
echo "$ifn"
|
echo "$ifn"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ prepare_interface() {
|
||||||
# if we're called for the bridge interface itself, don't bother trying
|
# if we're called for the bridge interface itself, don't bother trying
|
||||||
# to create any interfaces here. The scripts have already done that, otherwise
|
# to create any interfaces here. The scripts have already done that, otherwise
|
||||||
# the bridge interface wouldn't exist.
|
# the bridge interface wouldn't exist.
|
||||||
[ "$iface" = "br-$config" ] && return 0;
|
[ "br-$config" = "$iface" ] && return 0;
|
||||||
|
|
||||||
[ -f "$iface" ] && return 0;
|
[ -f "$iface" ] && return 0;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ setup_interface() {
|
||||||
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
||||||
|
|
||||||
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
||||||
[ "$proto1" != "$proto" ] && dhcpopts="-n -q"
|
[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
|
||||||
$DEBUG eval udhcpc -t 0 -i "$iface" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} -b -p "$pidfile" ${dhcpopts:- -R &}
|
$DEBUG eval udhcpc -t 0 -i "$iface" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} -b -p "$pidfile" ${dhcpopts:- -R &}
|
||||||
lock -u "/var/lock/dhcp-$iface"
|
lock -u "/var/lock/dhcp-$iface"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -5,7 +5,7 @@ export HOTPLUG_TYPE="$1"
|
||||||
|
|
||||||
# bypass the normal hotplug path for firmware loading
|
# bypass the normal hotplug path for firmware loading
|
||||||
# would otherwise cause problems with drivers like bcm43xx
|
# would otherwise cause problems with drivers like bcm43xx
|
||||||
[ "$HOTPLUG_TYPE" = "firmware" -a "$ACTION" = "add" ] && {
|
[ "firmware" = "$HOTPLUG_TYPE" -a "add" = "$ACTION" ] && {
|
||||||
[ -f "/lib/firmware/$FIRMWARE" ] && {
|
[ -f "/lib/firmware/$FIRMWARE" ] && {
|
||||||
echo 1 > "/sys$DEVPATH/loading"
|
echo 1 > "/sys$DEVPATH/loading"
|
||||||
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
|
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
|
||||||
|
|
|
@ -20,7 +20,7 @@ config_get proto "$cfg" proto
|
||||||
[ -z "$proto" ] && { echo "interface not found."; exit; }
|
[ -z "$proto" ] && { echo "interface not found."; exit; }
|
||||||
|
|
||||||
config_get iface "$cfg" device
|
config_get iface "$cfg" device
|
||||||
[ "$proto" = "static" ] && {
|
[ "static" = "$proto" ] && {
|
||||||
env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
|
env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +58,5 @@ for dev in $ifname $device; do
|
||||||
done
|
done
|
||||||
|
|
||||||
config_get iftype "$cfg" type
|
config_get iftype "$cfg" type
|
||||||
[ "$iftype" = "bridge" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
|
[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ bridge_interface() {(
|
||||||
wifi_updown() {
|
wifi_updown() {
|
||||||
for device in ${2:-$DEVICES}; do (
|
for device in ${2:-$DEVICES}; do (
|
||||||
config_get disabled "$device" disabled
|
config_get disabled "$device" disabled
|
||||||
[ "$disabled" == "1" ] && {
|
[ 1 == "$disabled" ] && {
|
||||||
echo "'$device' is disabled"
|
echo "'$device' is disabled"
|
||||||
set disable
|
set disable
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue