From 719d40d389eaaffee1d8d1682b39a42652195005 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Thu, 10 Mar 2022 15:34:45 +0100 Subject: [PATCH] make insert_modules variables local --- lib/set_MODULES.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/set_MODULES.sh b/lib/set_MODULES.sh index 648cf28..7ccc8d4 100755 --- a/lib/set_MODULES.sh +++ b/lib/set_MODULES.sh @@ -1,7 +1,10 @@ #!/bin/bash -function insert_MODULES () { +function insert_MODULES() { # Get the header and enabled modules separately from the /etc/modules file + local MODULES_HEADER + local MODULES_ENABLED + local VENDOR_RESET MODULES_HEADER=$(head -n $1 "$2" | grep -P "^#" | grep -v "# Added by quickpassthrough") MODULES_ENABLED=$(cat "$2" | grep -vP "^#" | grep -v "vendor-reset") VENDOR_RESET=0