From: Andre Noll Date: Wed, 6 Aug 2014 14:44:43 +0000 (+0200) Subject: gsu: Fix quoting of config default options. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c157c64bf6bd571494985409944421caeef0c063;p=gsu.git gsu: Fix quoting of config default options. This makes newlines in the default of a gsu config option work. --- 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