Fixed #116 in master too

pull/123/merge
deajan 7 years ago
parent 3ef4160cc8
commit 755edb0654

@ -3,7 +3,7 @@
#### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.1.4-rc1+
_OFUNCTIONS_BUILD=2017112301
_OFUNCTIONS_BUILD=2017123001
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -1201,8 +1201,8 @@ function GetLocalOS {
# Get linux versions
if [ -f "/etc/os-release" ]; then
localOsName=$(GetConfFileValue "/etc/os-release" "NAME")
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION")
localOsName=$(GetConfFileValue "/etc/os-release" "NAME" true)
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION" true)
fi
# Add a global variable for statistics in installer
@ -1932,6 +1932,8 @@ function VerComp () {
function GetConfFileValue () {
local file="${1}"
local name="${2}"
local noError="${3:-false}"
local value
value=$(grep "^$name=" "$file")
@ -1939,9 +1941,14 @@ function GetConfFileValue () {
value="${value##*=}"
echo "$value"
else
Logger "Cannot get value for [$name] in config file [$file]." "ERROR"
if [ $noError == true ]; then
Logger "Cannot get value for [$name] in config file [$file]." "NOTICE"
else
Logger "Cannot get value for [$name] in config file [$file]." "ERROR"
fi
fi
}
#### GetConfFileValue SUBSET END ####
#### SetConfFileValue SUBSET ####

Loading…
Cancel
Save