]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
readhash: Fix the quote check
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Jan 2026 16:21:38 +0000 (16:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Jan 2026 09:47:38 +0000 (09:47 +0000)
The single quotes changed bash's behaviour to interpret the * character
literally, but this is not what we wanted here. We need to escape the
single quotes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/functions

index c4b7cb39e675519e7fff7cbc0630f95766edc6d7..757912eabd3d05cd606c869a66110ec9618d132a 100644 (file)
@@ -930,7 +930,7 @@ readhash() {
 
                # strip leading and trailing single quotes
                case "${val}" in
-                       '*')
+                       \'*\')
                                val="${val#\'}"
                                val="${val%\'}"
                                ;;