projects
/
openwrt
/
staging
/
linusw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e5f02e
)
add a list append function to functions.sh
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 Jun 2006 21:45:07 +0000
(21:45 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 Jun 2006 21:45:07 +0000
(21:45 +0000)
SVN-Revision: 4014
openwrt/package/base-files/default/etc/functions.sh
patch
|
blob
|
history
diff --git
a/openwrt/package/base-files/default/etc/functions.sh
b/openwrt/package/base-files/default/etc/functions.sh
index d54a346315cf3f9ffc484343e093f795282a4621..fbb5a160c45ff5678f3c4c8995f518db39c1f4c7 100755
(executable)
--- a/
openwrt/package/base-files/default/etc/functions.sh
+++ b/
openwrt/package/base-files/default/etc/functions.sh
@@
-1,6
+1,10
@@
#!/bin/sh
alias debug=${DEBUG:-:}
+# newline
+N="
+"
+
# valid interface?
if_valid () (
ifconfig "$1" >&- 2>&- ||
@@
-12,6
+16,13
@@
hotplug_dev() {
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() {
return 0
}