diff --git a/xCAT-server/share/xcat/netboot/suse/genimage b/xCAT-server/share/xcat/netboot/suse/genimage index cbe4ef13b..3bc683a90 100755 --- a/xCAT-server/share/xcat/netboot/suse/genimage +++ b/xCAT-server/share/xcat/netboot/suse/genimage @@ -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: : 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; diff --git a/xCAT-vlan/install/postscripts/configvlan b/xCAT-vlan/install/postscripts/configvlan index b0a88bc6e..76ac1117f 100755 --- a/xCAT-vlan/install/postscripts/configvlan +++ b/xCAT-vlan/install/postscripts/configvlan @@ -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