]> git.tuebingen.mpg.de Git - gsu.git/commitdiff
gsu: Fix quoting of config default options.
authorAndre Noll <maan@systemlinux.org>
Wed, 6 Aug 2014 14:44:43 +0000 (16:44 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Aug 2014 19:39:58 +0000 (21:39 +0200)
This makes newlines in the default of a gsu config option work.

misc/gsu/config

index ff77daeac5e0c83a1cdeb482250a3feb301e1af4..6edd502fec0a0fd29a0af3abb922e78bea80a464 100644 (file)
@@ -21,10 +21,8 @@ gsu_check_options()
 
                eval "${gsu_options[$i]}"
 
 
                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].
                # 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
                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
 
                        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
                # Check option type. ATM, only num and string are supported
                # Other types may be added without breaking compatibility
                case "$option_type" in