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:
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user