2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-26 21:20:29 +00:00

Fixes suggested in review

This commit is contained in:
Mark Gurevich
2022-08-16 15:35:09 -04:00
parent 71d3b76881
commit 23df8f07f7
2 changed files with 4 additions and 2 deletions

View File

@@ -211,8 +211,10 @@ unless (grep /af_packet/, @ndrivers) {
unshift(@ndrivers, "af_packet.ko");
}
# Check both possible SLES files for version number.
# "--no-messages" suppresses "grep: <file>: No such file or directory"
my $osver_host;
if (`grep VERSION /etc/SUSE-brand` =~ /VERSION = (\d+)/) {
if (`grep --no-messages VERSION /etc/SuSE-release /etc/SUSE-brand` =~ /VERSION = (\d+)/) {
$osver_host = $1;
} else {
$osver_host = 11;

View File

@@ -21,7 +21,7 @@ if [[ -z $VLANMAXINDEX ]] || [[ $VLANMAXINDEX -eq 0 ]]; then
fi
if [[ $OSTYPE = linux* ]]; then
if [[ $OSVER = sles* ]] || [[ $OSVER = suse* ]] || [[ -f /etc/SuSE-release ]] || [[ -f /etc/SUSE-base ]]; then
if [[ $OSVER = sles* ]] || [[ $OSVER = suse* ]] || [[ -f /etc/SuSE-release ]] || [[ -f /etc/SUSE-brand ]]; then
nwdir="/etc/sysconfig/network"
isSLES=1
else