diff options
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/default/etc/functions.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/base-files/default/etc/functions.sh b/package/base-files/default/etc/functions.sh index d54a34631..fbb5a160c 100755 --- a/package/base-files/default/etc/functions.sh +++ b/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 } |