From 924261bc926ce497eecad2d0f10b03088e3fdec7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 7 Nov 2014 22:36:29 +0100 Subject: examples: openwrt/fastd.init: allow specifying bind interfaces --- doc/examples/openwrt/fastd.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/examples/openwrt/fastd.init b/doc/examples/openwrt/fastd.init index f7a939c..325ea12 100644 --- a/doc/examples/openwrt/fastd.init +++ b/doc/examples/openwrt/fastd.init @@ -45,7 +45,7 @@ guard_value() { echo -n "$t" } -guard_remote() { +guard_quotes() { local t=${1//[^-a-zA-Z0-9\[\].:\"% ]/} local quotes=${t//[^\"]/} if [ "${#quotes}" = 0 -o "${#quotes}" = 2 ]; then @@ -63,7 +63,7 @@ yes_no() { config_string_config='include $(escape_string "$value");' config_string_config_peer='include peer $(escape_string "$value");' config_string_config_peer_dir='include peers from $(escape_string "$value");' -config_string_bind='bind $(guard_value "$value");' +config_string_bind='bind $(guard_quotes "$value");' config_string_method='method $(escape_string "$value");' config_string_syslog_level='log to syslog level $(guard_value "$value");' config_string_mode='mode $(guard_value "$value");' @@ -85,7 +85,7 @@ config_string_peer_group='peer group $(escape_string "$value") {' peer_string_key='key $(escape_string "$value");' peer_string_float='float $(yes_no "$value");' -peer_string_remote='remote $(guard_remote "$value");' +peer_string_remote='remote $(guard_quotes "$value");' generate_option() { local __string=$(eval echo \"\$$2\") -- cgit v1.2.3