From 13f455b2a194f9bfa3d4584a8a24e941d55fb271 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 22 Dec 2012 13:10:01 -0500 Subject: init_functions: namespace parsed vars from cmdline It's possible, though unlikely, that someone expecting a variable of the name, e.g. "rhs" or "lhs" to be propagated from the kernel cmdline could be sadly let down because of the local scoping. Give our localized vars names less likely to clash. Signed-off-by: Dave Reisner --- init_functions | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/init_functions b/init_functions index 761f7a2..ff6a3b4 100644 --- a/init_functions +++ b/init_functions @@ -71,49 +71,49 @@ run_hookfunctions() { } parse_cmdline() { - local w in_quotes lhs rhs - in_quotes=0 - for w in $(cat /proc/cmdline); do - if [ "$in_quotes" = 0 ]; then - case "$w" in + local _w _quoted _lhs _rhs _cmdline + read -r _cmdline