From c157c64bf6bd571494985409944421caeef0c063 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 6 Aug 2014 16:44:43 +0200 Subject: [PATCH] gsu: Fix quoting of config default options. This makes newlines in the default of a gsu config option work. --- misc/gsu/config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/gsu/config b/misc/gsu/config index ff77dae..6edd502 100644 --- a/misc/gsu/config +++ b/misc/gsu/config @@ -21,10 +21,8 @@ gsu_check_options() eval "${gsu_options[$i]}" - # Check name. It must be non-empty and consist of [a-zA-Z_0-9] # only. Moreover it must not start with [a-zA-Z]. - ret=-$E_GSU_BAD_CONFIG_VAR result="name: '$name'" # bash's =~ works only for 3.2 and newer, so use grep @@ -51,7 +49,7 @@ gsu_check_options() return esac - eval ${gsu_config_var_prefix}_$name='"'\${val:=$default_value}'"' + eval ${gsu_config_var_prefix}_$name='"'\${val:="$default_value"}'"' # Check option type. ATM, only num and string are supported # Other types may be added without breaking compatibility case "$option_type" in -- 2.30.2