summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-06-15 16:07:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-06-15 16:07:09 +0000
commit90d54c0faaaaf14edad59185d6066c5b32273dcb (patch)
treea7429f41f482afebd0ac8c04d417ff026e2bbbfd /package/base-files
parent5e6f8739be1b3de38ed7ad1c7dc80bc1f4c4bf31 (diff)
downloadmtk-20170518-90d54c0faaaaf14edad59185d6066c5b32273dcb.zip
mtk-20170518-90d54c0faaaaf14edad59185d6066c5b32273dcb.tar.gz
mtk-20170518-90d54c0faaaaf14edad59185d6066c5b32273dcb.tar.bz2
more fixes
SVN-Revision: 7639
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/bin/uci2
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh6
-rwxr-xr-xpackage/base-files/files/sbin/hotplug-call2
-rwxr-xr-xpackage/base-files/files/sbin/ifdown4
-rwxr-xr-xpackage/base-files/files/sbin/wifi2
5 files changed, 8 insertions, 8 deletions
diff --git a/package/base-files/files/bin/uci b/package/base-files/files/bin/uci
index 90098f0..f89fe82 100755
--- a/package/base-files/files/bin/uci
+++ b/package/base-files/files/bin/uci
@@ -106,7 +106,7 @@ do_show() {
SECTION=""
config_cb() {
- if [ -z "$CONFIG" -o "$CONFIG" = "$2" ]; then
+ if [ -z "$CONFIG" -o ."$CONFIG" = ."$2" ]; then
append SECTION "$2"
option_cb() {
append "${CONFIG_SECTION}_VARS" "$1"
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index c5334cb..8e19a6e 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -13,7 +13,7 @@ find_config() {
esac
config_get device "$ifn" device
for ifc in $device $iface $ifaces; do
- [ "$ifc" = "$1" ] && {
+ [ ."$ifc" = ."$1" ] && {
echo "$ifn"
return 0
}
@@ -74,7 +74,7 @@ prepare_interface() {
# 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
# the bridge interface wouldn't exist.
- [ "$iface" = "br-$config" ] && return 0;
+ [ "br-$config" = "$iface" ] && return 0;
[ -f "$iface" ] && return 0;
@@ -181,7 +181,7 @@ setup_interface() {
$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)
- [ "$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 &}
lock -u "/var/lock/dhcp-$iface"
;;
diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call
index 607ee2e..57011d1 100755
--- a/package/base-files/files/sbin/hotplug-call
+++ b/package/base-files/files/sbin/hotplug-call
@@ -5,7 +5,7 @@ export HOTPLUG_TYPE="$1"
# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
-[ "$HOTPLUG_TYPE" = "firmware" -a "$ACTION" = "add" ] && {
+[ "firmware" = "$HOTPLUG_TYPE" -a "add" = "$ACTION" ] && {
[ -f "/lib/firmware/$FIRMWARE" ] && {
echo 1 > "/sys$DEVPATH/loading"
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
diff --git a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown
index 5a98003..8ec568f 100755
--- a/package/base-files/files/sbin/ifdown
+++ b/package/base-files/files/sbin/ifdown
@@ -20,7 +20,7 @@ config_get proto "$cfg" proto
[ -z "$proto" ] && { echo "interface not found."; exit; }
config_get iface "$cfg" device
-[ "$proto" = "static" ] && {
+[ "static" = "$proto" ] && {
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
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
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 6e8e418..2ca5d22 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -38,7 +38,7 @@ bridge_interface() {(
wifi_updown() {
for device in ${2:-$DEVICES}; do (
config_get disabled "$device" disabled
- [ "$disabled" == "1" ] && {
+ [ 1 == "$disabled" ] && {
echo "'$device' is disabled"
set disable
}