From: Baptiste Jonglez Date: Mon, 9 Jan 2017 15:05:03 +0000 (+0100) Subject: babeld: Properly quote variables X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=669fe615c644920b88d42943fb1920695ab30e63;p=feed%2Frouting.git babeld: Properly quote variables This was mostly introduced by 82d9002689 ("babeld: add support for dynamic config files"). Signed-off-by: Baptiste Jonglez --- diff --git a/babeld/files/babeld.init b/babeld/files/babeld.init index def90b2..dea207a 100755 --- a/babeld/files/babeld.init +++ b/babeld/files/babeld.init @@ -18,7 +18,7 @@ ignored_options="carrier_sense assume_wireless no_split_horizon random_router_id # Append a line to the configuration file cfg_append() { local value="$1" - echo "$value" >> $CONFIGFILE + echo "$value" >> "$CONFIGFILE" } cfg_append_option() { @@ -215,13 +215,13 @@ babel_config_cb() { start_service() { mkdir -p /var/lib mkdir -p /var/etc - mkdir -p $OTHERCONFIGDIR + mkdir -p "$OTHERCONFIGDIR" # Start by emptying the generated config file >"$CONFIGFILE" # Import dynamic config files - for f in $OTHERCONFIGDIR/*.conf; do - [ -f "$f" ] && cat $f >> $CONFIGFILE + for f in "$OTHERCONFIGDIR"/*.conf; do + [ -f "$f" ] && cat "$f" >> "$CONFIGFILE" done # First load the whole config file, without callbacks, so that we are # aware of all "ignore" options in the second pass.