diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index ce2faf5be..1b121e7f6 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -3307,6 +3307,9 @@ sub nodeSet { # SUSE installation my $customTmpl; + my $pkglist; + my $patterns = ''; + my $packages = ''; if ( $os =~ m/sles/i ) { # Create directory in FTP root (/install) to hold template @@ -3321,7 +3324,37 @@ sub nodeSet { xCAT::zvmUtils->printLn( $callback, "$node: (Error) An autoyast template does not exist for $os in $installDir/custom/install/sles/" ); return; } - + + # Get pkglist from /install/custom/install/sles/compute.sles11.s390x.otherpkgs.pkglist + # Original one is in /opt/xcat/share/xcat/install/sles/compute.sles11.s390x.otherpkgs.pkglist + $pkglist = "/install/custom/install/sles/" . $profile . "." . $osBase . "." . $arch . ".pkglist"; + if ( !(-e $pkglist) ) { + xCAT::zvmUtils->printLn( $callback, "$node: Missing package list for $os in /install/custom/install/sles/" ); + return; + } + + # Read in each software pattern or package + open (FILE, $pkglist); + while () { + chomp; + + # Create tags, e.g. + # apache + # directory_server + $_ = xCAT::zvmUtils->trimStr($_); + if ($_ && $_ =~ /@/) { + $_ =~ s/@//g; + $patterns .= "$_"; + } elsif ($_) { + $packages .= "$_"; + } + + } + close (FILE); + + # Add appropriate software packages or patterns + $out = `sed --in-place -e "s,replace_software_packages,$packages,g" \ -e "s,replace_software_patterns,$patterns,g" $customTmpl`; + # Copy postscript into template $out = `sed --in-place -e "//r $postScript" $customTmpl`; @@ -3332,9 +3365,7 @@ sub nodeSet { # SLES 11 if ( $os =~ m/sles11/i ) { $device = "eth0"; - } - else { - + } else { # SLES 10 $device = "qeth-bus-ccw-$readChannel"; } @@ -3457,6 +3488,26 @@ sub nodeSet { return; } + # Get pkglist from /install/custom/install/sles/compute.sles11.s390x.otherpkgs.pkglist + # Original one is in /opt/xcat/share/xcat/install/sles/compute.sles11.s390x.otherpkgs.pkglist + $pkglist = "/install/custom/install/rh/" . $profile . "." . $osBase . "." . $arch . ".pkglist"; + if ( !(-e $pkglist) ) { + xCAT::zvmUtils->printLn( $callback, "$node: Missing package list for $os in /install/custom/install/rh/" ); + return; + } + + # Read in each software pattern or package + open (FILE, $pkglist); + while () { + chomp; + $_ = xCAT::zvmUtils->trimStr($_); + $packages .= "$_\\n"; + } + close (FILE); + + # Add appropriate software packages or patterns + $out = `sed --in-place -e "s,replace_software_packages,$packages,g" $customTmpl`; + # Copy postscript into template $out = `sed --in-place -e "/%post/r $postScript" $customTmpl`; diff --git a/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.pkglist b/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.pkglist index eb3477d6f..13e471b33 100644 --- a/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.pkglist +++ b/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.pkglist @@ -4,3 +4,4 @@ fipscheck device-mapper-multipath sgpio +apr \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.tmpl b/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.tmpl index caa976446..dffd4e8fd 100644 --- a/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.tmpl +++ b/xCAT-server/share/xcat/install/rh/compute.rhel5.s390x.tmpl @@ -23,8 +23,6 @@ part / --fstype ext3 --size=100 --grow --ondisk=dasda part swap --size=512 --ondisk=dasda %packages -@base -@core -@base-x +replace_software_packages %post \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.pkglist b/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.pkglist new file mode 100644 index 000000000..ec56a2a39 --- /dev/null +++ b/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.pkglist @@ -0,0 +1,3 @@ +@base +@core +apr diff --git a/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.tmpl b/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.tmpl index 6f23f2ce1..dffd4e8fd 100644 --- a/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.tmpl +++ b/xCAT-server/share/xcat/install/rh/compute.rhels6.s390x.tmpl @@ -23,7 +23,6 @@ part / --fstype ext3 --size=100 --grow --ondisk=dasda part swap --size=512 --ondisk=dasda %packages -@base -@core +replace_software_packages %post \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.pkglist b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.pkglist index 021fa3147..894b7d0b6 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.pkglist +++ b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.pkglist @@ -1,4 +1,3 @@ @base -@x11 -@gnome +libapr1 \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl index aebf30396..76174dc96 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl +++ b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl @@ -533,10 +533,13 @@ - base + replace_software_patterns + + replace_software_packages + - + diff --git a/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.pkglist b/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.pkglist index 021fa3147..894b7d0b6 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.pkglist +++ b/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.pkglist @@ -1,4 +1,3 @@ @base -@x11 -@gnome +libapr1 \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.tmpl b/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.tmpl index aebf30396..8cd71f1ee 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.tmpl +++ b/xCAT-server/share/xcat/install/sles/compute.sles11.s390x.tmpl @@ -533,8 +533,11 @@ - base + replace_software_patterns + + replace_software_packages + diff --git a/xCAT-server/share/xcat/install/sles/ref.sles10.s390x.tmpl b/xCAT-server/share/xcat/install/sles/ref.sles10.s390x.tmpl index 6e86316ff..cc5982a0c 100644 --- a/xCAT-server/share/xcat/install/sles/ref.sles10.s390x.tmpl +++ b/xCAT-server/share/xcat/install/sles/ref.sles10.s390x.tmpl @@ -320,8 +320,11 @@ - insert_software_pattern + replace_software_patterns + + replace_software_packages + diff --git a/xCAT-server/share/xcat/install/sles/ref.sles11.s390x.tmpl b/xCAT-server/share/xcat/install/sles/ref.sles11.s390x.tmpl index 6e86316ff..cc5982a0c 100644 --- a/xCAT-server/share/xcat/install/sles/ref.sles11.s390x.tmpl +++ b/xCAT-server/share/xcat/install/sles/ref.sles11.s390x.tmpl @@ -320,8 +320,11 @@ - insert_software_pattern + replace_software_patterns + + replace_software_packages +