diff --git a/perl-xCAT/xCAT/zvmCPUtils.pm b/perl-xCAT/xCAT/zvmCPUtils.pm index cac661f95..7dfa4c8c5 100644 --- a/perl-xCAT/xCAT/zvmCPUtils.pm +++ b/perl-xCAT/xCAT/zvmCPUtils.pm @@ -614,10 +614,6 @@ sub punch2Reader { my $out; if ( $os =~ m/sles10/i ) { $out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`; - } elsif ( $os =~ m/sles11/i ) { - $out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /usr/sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`; - } elsif ( $os =~ m/rhel/i ) { - $out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /usr/sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`; } else { $out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /usr/sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`; } diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index d502071a9..3029e7738 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -101,6 +101,7 @@ my %guestidmap = ( "centos6.*" => "rhel6_", "centos5.*" => "rhel5_", "centos4.*" => "rhel4_", + "sles12.*" => "sles12_", "sles11.*" => "sles11_", "sles10.*" => "sles10_", "win2k8" => "winLonghorn", diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 3d2386809..2909e1294 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -3185,7 +3185,7 @@ sub updateOS xCAT::MsgUtils->message("I", $rsp, $callback); } - elsif ("$installOS$version" =~ m/sles11/i) + elsif ("$installOS$version" =~ m/sles/i) { # SUSE repository path - http://10.1.100.1/install/sles10.3/s390x/1/ diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 1e02404e4..aa5b05d03 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -1126,7 +1126,7 @@ sub changeVM { } $out = xCAT::zvmUtils->rExecute($::SUDOER, $node, "echo 0x$wwpn:0x$lun >> /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$device"); - } elsif ( $os =~ m/sles11/i ) { + } elsif ( $os =~ m/sles/i ) { $out = `ssh $::SUDOER\@$node "$::SUDO /sbin/zfcp_host_configure 0.0.$device 1"`; if ($out) { xCAT::zvmUtils->printLn($callback, "$node: $out"); @@ -1932,12 +1932,13 @@ sub changeVM { # SLES 10: /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-* # SLES 11: /etc/udev/rules.d/51-zfcp* my $expression = ""; - if ( $os =~ m/sles10/i ) { + if ( $os =~ m/sles/i ) { $expression = "/$lun/d"; - $out = `ssh $::SUDOER\@$node "$::SUDO sed -i -e $expression /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$device"`; - } elsif ( $os =~ m/sles11/i ) { - $expression = "/$lun/d"; - $out = `ssh $::SUDOER\@$node "$::SUDO sed -i -e $expression /etc/udev/rules.d/51-zfcp-0.0.$device.rules"`; + if ( $os =~ m/sles10/i ) { + $out = `ssh $::SUDOER\@$node "$::SUDO sed -i -e $expression /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$device"`; + } else { + $out = `ssh $::SUDOER\@$node "$::SUDO sed -i -e $expression /etc/udev/rules.d/51-zfcp-0.0.$device.rules"`; + } } elsif ( $os =~ m/rhel/i ) { $expression = "/$lun/d"; $out = `ssh $::SUDOER\@$node "$::SUDO sed -i -e $expression /etc/zfcp.conf"`; @@ -4440,7 +4441,7 @@ EOM"`; } # If it is SLES 11 - ifcfg-qeth file is in /etc/sysconfig/network - elsif ( $srcOs =~ m/sles11/i ) { + elsif ( $srcOs =~ m/sles/i ) { $out = `ssh $::SUDOER\@$hcp "$::SUDO grep -H -i -r $srcNicAddr $cloneMntPt/etc/sysconfig/network/ifcfg-eth*"`; xCAT::zvmUtils->printSyslog("grep -H -i -r $srcNicAddr $cloneMntPt/etc/sysconfig/network/ifcfg-eth*"); xCAT::zvmUtils->printSyslog("$out"); @@ -5081,12 +5082,12 @@ sub nodeSet { my $device; my $chanIds = "$readChannel $writeChannel $dataChannel"; - # SLES 11 - if ( $os =~ m/sles11/i ) { - $device = "eth0"; - } else { + # SLES + if ( $os =~ m/sles10/i ) { # SLES 10 $device = "qeth-bus-ccw-$readChannel"; + } else { + $device = "eth0"; } $out = diff --git a/xCAT-server/share/xcat/scripts/xcatconf4z b/xCAT-server/share/xcat/scripts/xcatconf4z index 83eb026de..cc0181705 100644 --- a/xCAT-server/share/xcat/scripts/xcatconf4z +++ b/xCAT-server/share/xcat/scripts/xcatconf4z @@ -350,7 +350,7 @@ function setupDisk { /sbin/zfcp_host_configure 0.0.$xcat_fcpAddr 1 /sbin/zfcp_disk_configure 0.0.$xcat_fcpAddr $xcat_wwpn $xcat_lun 1 echo "0x$xcat_wwpn:0x$xcat_lun" >> /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$xcat_fcpAddr - elif [[ $os == sles11* ]]; then + elif [[ $os == sles* ]]; then /sbin/zfcp_host_configure 0.0.$xcat_fcpAddr 1 /sbin/zfcp_disk_configure 0.0.$xcat_fcpAddr $xcat_wwpn $xcat_lun 1 @@ -455,7 +455,7 @@ function setupDisk { if [[ $os == sles10* ]]; then expression="/$xcat_lun/d" sed --in-place -e $expression /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$xcat_fcpAddr - elif [[ $os == sles11* ]]; then + elif [[ $os == sles* ]]; then expression="/$xcat_lun/d" sed --in-place -e $expression /etc/udev/rules.d/51-zfcp-0.0.$xcat_fcpAddr.rules elif [[ $os == rhel* ]]; then diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index c3c0e8c91..1bf1defea 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -492,7 +492,7 @@ if ( pmatch "$OSVER" "sles10*" ); then fi fi fi -elif ( pmatch "$OSVER" "sles11*" ); then +elif ( pmatch "$OSVER" "sles" ); then #check if zypper is installed result=`rpm -q zypper` if [ $? -ne 0 ]; then diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index e929497d8..b2109c3d9 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -428,7 +428,7 @@ fi ########### ##start generating the os pkg repositories -if ( pmatch "$OSVER" "sles11*" && [ $haszypper -eq 1 ] ); then +if ( ("$OSVER" ge "sles11") && [ $haszypper -eq 1 ] ); then old_repo=`zypper lr |grep -e "^[0-9]" | cut -f2 -d '|'` for x in $old_repo do @@ -701,7 +701,7 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do fi elif [ $haszypper -eq 1 ]; then #use zypper - if ( pmatch "$OSVER" "sles11*" ); then + if ( "$OSVER" ge "sles11" ); then result=`zypper ar -c $REPOFILE` else result=`zypper sa -r $REPOFILE << EOF