Browse Source

another method extract startparameters from _default.cfg

pull/3151/head
Daniel Gibbs 5 years ago
parent
commit
41472c984e
  1. 9
      linuxgsm.sh

9
linuxgsm.sh

@ -402,7 +402,6 @@ else
fi fi
fi fi
# Configs have to be loaded twice to allow start startparameters to pick up all vars # Configs have to be loaded twice to allow start startparameters to pick up all vars
fn_configs(){
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${configdirserver}/_default.cfg" source "${configdirserver}/_default.cfg"
# Load the common.cfg config. If missing download it. # Load the common.cfg config. If missing download it.
@ -441,14 +440,14 @@ else
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${configdirserver}/secrets-${selfname}.cfg" source "${configdirserver}/secrets-${selfname}.cfg"
fi 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. # Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5"
fi fi
}
fn_configs
fn_configs
fi fi
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.

Loading…
Cancel
Save