add a list append function to functions.sh
SVN-Revision: 4014
This commit is contained in:
parent
1e5f02e9d0
commit
5e01d653fa
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue