From 41472c984e1fef9ccc66a9ea9a7c249a2d6c1b44 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 31 Dec 2020 15:55:15 +0000 Subject: [PATCH] another method extract startparameters from _default.cfg --- linuxgsm.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index cb414ffcd..7d6f78f84 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -402,7 +402,6 @@ else fi fi # Configs have to be loaded twice to allow start startparameters to pick up all vars - fn_configs(){ # shellcheck source=/dev/null source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. @@ -441,14 +440,14 @@ else # shellcheck source=/dev/null source "${configdirserver}/secrets-${selfname}.cfg" fi - + if [ ! "$(grep startparameters "${configdirserver}/common.cfg")" ]||[ ! "$(grep startparameters "${configdirserver}/${selfname}.cfg")" ]; then + startparameters="$(grep startparameters= "${configdirserver}/_default.cfg" | sed -e 's/startparameters=//g')" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi - } - fn_configs - fn_configs + fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.