mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Don't send empty strings to __parse_version_string
.
This commit is contained in:
parent
b6a2ecd1bd
commit
d20d57d2b8
1 changed files with 5 additions and 2 deletions
|
@ -367,7 +367,8 @@ __gather_linux_system_info() {
|
|||
|
||||
if [ -f /etc/lsb-release ]; then
|
||||
DISTRO_NAME=$(grep DISTRIB_ID /etc/lsb-release | sed -e 's/.*=//')
|
||||
DISTRO_VERSION=$(__parse_version_string $(grep DISTRIB_RELEASE /etc/lsb-release | sed -e 's/.*=//'))
|
||||
rv=$(grep DISTRIB_RELEASE /etc/lsb-release | sed -e 's/.*=//')
|
||||
[ "${rv}x" != "x" ] && DISTRO_VERSION=$(__parse_version_string "$rv")
|
||||
fi
|
||||
|
||||
if [ "x$DISTRO_NAME" != "x" ] && [ "x$DISTRO_VERSION" != "x" ]; then
|
||||
|
@ -385,7 +386,9 @@ __gather_linux_system_info() {
|
|||
[ ! -f "/etc/${rsource}" ] && continue # Does not exist
|
||||
|
||||
n=$(echo ${rsource} | sed -e 's/[_-]release$//' -e 's/[_-]version$//')
|
||||
v=$( __parse_version_string "$( (grep VERSION /etc/${rsource}; cat /etc/${rsource}) | grep '[0-9]' | sed -e 'q' )" )
|
||||
rv=$( (grep VERSION /etc/${rsource}; cat /etc/${rsource}) | grep '[0-9]' | sed -e 'q' )
|
||||
[ "${rv}x" = "x" ] && continue # There's no version information. Continue to next rsource
|
||||
v=$(__parse_version_string "$rv")
|
||||
case $(echo ${n} | tr '[:upper:]' '[:lower:]') in
|
||||
redhat )
|
||||
if [ ".$(egrep 'CentOS' /etc/${rsource})" != . ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue