mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add a list append function to functions.sh
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4014 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
alias debug=${DEBUG:-:}
|
alias debug=${DEBUG:-:}
|
||||||
|
|
||||||
|
# newline
|
||||||
|
N="
|
||||||
|
"
|
||||||
|
|
||||||
# valid interface?
|
# valid interface?
|
||||||
if_valid () (
|
if_valid () (
|
||||||
ifconfig "$1" >&- 2>&- ||
|
ifconfig "$1" >&- 2>&- ||
|
||||||
@@ -12,6 +16,13 @@ hotplug_dev() {
|
|||||||
env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net
|
env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net
|
||||||
}
|
}
|
||||||
|
|
||||||
|
append() {
|
||||||
|
local var="$1"
|
||||||
|
local value="$2"
|
||||||
|
local sep="${3:- }"
|
||||||
|
eval "export ${var}=\"\${${var}:+\${${var}}${value:+$sep}}$value\""
|
||||||
|
}
|
||||||
|
|
||||||
config_cb() {
|
config_cb() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user