From 669fe615c644920b88d42943fb1920695ab30e63 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Mon, 9 Jan 2017 16:05:03 +0100 Subject: [PATCH] babeld: Properly quote variables This was mostly introduced by 82d9002689 ("babeld: add support for dynamic config files"). Signed-off-by: Baptiste Jonglez --- babeld/files/babeld.init | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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. -- 2.30.2