[3/5] readhash: Fix the quote check

Message ID 20260119162140.3373757-3-michael.tremer@ipfire.org
State New
Headers
Series [1/5] hostapd: Bring back support for 802.11g/a |

Commit Message

Michael Tremer 19 Jan 2026, 4:21 p.m. UTC
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>
---
 src/initscripts/system/functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions
index c4b7cb39e..757912eab 100644
--- a/src/initscripts/system/functions
+++ b/src/initscripts/system/functions
@@ -930,7 +930,7 @@  readhash() {
 
 		# strip leading and trailing single quotes
 		case "${val}" in
-			'*')
+			\'*\')
 				val="${val#\'}"
 				val="${val%\'}"
 				;;