From: Matthijs Kooijman Date: Wed, 17 Mar 2010 21:44:09 +0000 (+0100) Subject: Remove (useless) s/*/__star__/ replacement in getconf. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=commitdiff_plain;h=7d31791c5b913df3d2c330b51cf829dacda111ab Remove (useless) s/*/__star__/ replacement in getconf. It seems this was meant to replace * with __star__ to prevent globbing, but getconf already handles its values properly so globbing does not occur. Currently, this replacement was broken due to the double backslash, causing it to replace a backslash and all following characters with __star__, instead of a literal *. This is also confirmed by the fact that some handlers' documentation says to use __star__ instead of * directly in the configuration (and they have special handling to turn __star__ back into * or something else as appropriate). Eventually, we should just support using * directly and fixing up all handling of the variable to not cause any globbing or other expansion (also because fixing * isn't complete, there is also ? and sometimes ~ and other special characters might be expanded as well). --- diff --git a/lib/tools.in b/lib/tools.in index a6dcf26..2715a00 100644 --- a/lib/tools.in +++ b/lib/tools.in @@ -50,9 +50,6 @@ function printconf() { function getconf() { ret=`printconf "$1" "$2"` - # replace * with %, so that it is not globbed. - ret="${ret//\\*/__star__}" - # We use escape the $ in $ret to delay expansion of $ret, so when $1 # is foo, eval sees foo=$ret and properly does the assignment # (without the backslash, the right part of the assignment would be