mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-08 13:55:37 +00:00
Bug#4482 Otherpkgs postscripts didn't support SLES12
This commit is contained in:
@ -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"`;
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ my %guestidmap = (
|
||||
"centos6.*" => "rhel6_",
|
||||
"centos5.*" => "rhel5_",
|
||||
"centos4.*" => "rhel4_",
|
||||
"sles12.*" => "sles12_",
|
||||
"sles11.*" => "sles11_",
|
||||
"sles10.*" => "sles10_",
|
||||
"win2k8" => "winLonghorn",
|
||||
|
@ -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/
|
||||
|
@ -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 =
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user