NOTE:All of the examples in this section reflect the x86_64 (64-bit) platform.
The information and instructions in the following sections help you perform an unattended, online upgrade from Open Enterprise Server (OES) 2 SP2 to OES 2 SP3 by using ZENworks Linux Management (ZLM) and an OES 2 SP3 ISO image file.
After completing the instructions in the following sections, OES 2 SP2 servers are upgraded according to the schedule you set.
Before you can use ZENworks Linux Management to upgrade OES 2 SP2 servers to OES 2 SP3, you must have the following:
The ZENworks Linux Management 7.3 IR3 server installed and running on your network.
The ZENworks Linux Management 7.3 IR3 Agent installed on each OES 2 SP2 server that you plan to upgrade.
IMPORTANT:The agent included with OES provides package-management capabilities through the ZENworks Management Daemon. Unless the full agent is installed, updates cannot be scheduled from the ZENworks Linux Management server.
Each OES 2 SP2 server registered with the ZENworks Linux Management server.
For the upgrade process, you need to create the following bundles on the ZLM server:
When you create this bundle, all of the OES 2 SP3 RPMs are added to it.
Download the OES 2 SP3 ISO image for the x86_64 (64-bit) platform.
Create a pkgadd.sh file and copy it to the ZLM server. For more information on the pkgadd.sh file, refer to the Creating the pkgadd.sh file.
Add the execute permission to the pkgadd.sh file:
chmod +x pkgadd.sh
On the ZLM server, mount the OES 2 SP3 ISO image under the directory where you copied pkgadd.sh.
For example, if the pkgadd.sh file is copied to the /home/user1/ directory, mount the OES 2 SP3 ISO image on /home/user1/oes2sp3/.
Execute the following command:
./pkgadd.sh OES2SP3-bundle sles-10-x86_64
This creates the OES2SP3-bundle for the x86_64 platform with OES 2 SP3 RPMs.
You must create the answer file and the prereboot.sh file before executing the following steps.
Log in to ZENworks Control Center.
Click .
In the panel, click > .
Select , then click .
In the field, type OES2SP3-file-bundle.
Click .
The file bundle is ready to have files added to it.
Add the prereboot.sh file to OES2SP3-file-bundle:
In the panel, click > .
In the field, type /tmp.
In the list, select .
Click , browse to and select the prereboot.sh script file on your workstation or server, then click .
The prereboot.sh file is set to be uploaded to the /tmp directory on each server being upgraded.
Add the answer file to OES2SP3-file-bundle:
In the panel, click > .
In the field, type /opt/novell/oes-install.
In the list, select .
Click , browse to and select the answer file on your workstation or server, then click .
The prereboot.sh and answer files are listed.
Below the panel, click .
An empty list is displayed.
Click .
In the drop-down list, select .
In the drop-down list, select .
Copy and paste the following contents to the box:
#!/bin/sh /etc/init.d/atd start at now + 2 minutes -f /tmp/prereboot.sh
Click > .
Click > .
The file bundle is created.
Log in to ZENworks Control Center.
Click .
In the panel, click > .
Select , then click .
In the field, type OES2SP3-firstboot-bundle.
Click .
The file bundle is ready to have files added to it.
In the panel, click
In the panel > field, type yast2-firstboot and click .
Select RPM, then click .
The yast2-firstboot rpm is available as part of the SLES10 SP4 bundle on the ZENworks Linux Management (ZLM) server. If the SLES 10 SP4 bundle is not available on the ZLM server, then copy yast2-firstboot.rpm from the SLES 10 SP4 ISO image and upload the RPM to this bundle.
Click .
Under , click .
In the drop-down list, select .
In the drop-down list, select .
Copy and paste the contents from Section C.2.6, Post-Installation Script File to the box.
Click > .
Click > .
The post-installation script is added to the Scriptable Actions panel.
Assign the bundles to the OES 2 SP2 servers, then schedule them to install appropriately.
In the ZENworks Control Center, click .
In the left column, select , , and .
Click > .
Click , click the down-arrow by , then select the servers you want to upgrade.
Click > .
Schedule the bundles to install according to your organization’s policy.
Click > > .
IMPORTANT:The servers you have selected in the preceding steps are now ready to be upgraded to OES 2 SP3. The actual upgrade operations occur automatically as scheduled.
For the upgrade process to run without user intervention, each SP3 server must have an eDirectory password answer file for the YaST install.
As root, open a terminal prompt.
At the prompt, enter the following command:
sudo yast2 create-answer-file ldap_password optional_domain_admin_password
Replace ldap_password with the LDAP (eDirectory) Admin password and optional_domain_admin_password with the Domain Services for Windows (DSfW) Domain Administrator password, if it is needed for any of the servers being upgraded. (The existence of a second password in the answer file does not affect the upgrade process on servers that don’t have DSfW installed.)
IMPORTANT:All the uses of an exclamation mark (!) require that you escape the character by using a backslash (\). For example, the password novell! must be specified as novell\!.
A dash (-) used at the beginning of a password also requires escaping. For example, -novell- must be specified as \-novell-.
Press to close the confirmation message.
From your working directory, copy the resulting answer file to the workstation or server that you will use to create the bundles.
The prereboot.sh script checks whether the bundles are installed. On successful installation of all bundles, it triggers a reboot.
Open any text editor.
Copy and paste the following text into a text editor, then save it as prereboot.sh
#!/bin/bash status="j" while [ $status != "ii" ] ; do sleep 10 status=i`rug bl |grep OES2SP3-bundle |cut -f1 -d '|'` done status="j" while [ $status != "ii" ] ; do sleep 10 status=i`rug bl |grep OES2SP3-firstboot-bundle |cut -f1 -d '|'` done sleep 60 /sbin/reboot
IMPORTANT:In the above script, the bundle names are OES2SP3-bundle and OES2SP3-firstboot-bundle. If your bundle name is different, change the script accordingly. If the bundle names are inaccurate, the reboot is not triggered after installation of the bundles.
This script is used to create a bundle from an ISO image.
Usage: pkgadd.sh <bundle_name> <arch/target>
To create the pkgadd.sh file:
Open any text editor.
Copy and paste the following text into the text editor, then save it as pkgadd.sh.
#!/bin/bash
#
# Run this program from a directory filled with RPMS to load them into a bundle in ZLM.
#
# All rpms, except src and nosrc rpms, in the directory and all of its subdirectories will be loaded into the bundle and architecture indicated below.
#
# Don't forget to enter your admin password below and update the bundle name and architecture below.
#
if [ $# -lt 2 ]
then
echo "Usage :: pkgadd.sh <bundle_name> <arch> "
echo "Example :: pkgadd.sh SLES-9-Distro sles-9-i586 "
exit
fi
# Create the bundle to load into
zlman -V -U administrator -P novell bc $1
# loop through these directories and load all of the rpms
STARTDIR=`pwd`
for dir in `find . |grep .rpm |grep -v src.rpm|grep -v nosrc.rpm|awk -F / '{NF--; OFS="/"; print $0}'| sort | uniq`; do
cd $STARTDIR
cd $dir
echo "Loading RPM's from `pwd`"
zlman -V -U administrator -P novell bap $1 $2 *.rpm --force-nevra --freshen;
done
The following post-installation script is added to the OES 2 SP3-firstboot-bundle. See Step 14.
#!/bin/sh
touch /etc/reconfig_system
chkconfig firstboot on
cat > /etc/YaST2/firstboot.xml << EndOfText
<?xml version="1.0"?>
<!DOCTYPE productDefines SYSTEM "/usr/share/YaST2/control/control.dtd">
<productDefines xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<!--
: firstboot.xml 35106 2007-01-05 13:42:15Z jsrain $
Work around for the text domain
textdomain="firstboot"
-->
<textdomain>firstboot</textdomain>
<workflows config:type="list">
<workflow>
<defaults>
<enable_back>yes</enable_back>
<enable_next>yes</enable_next>
<archs>all</archs>
</defaults>
<stage>firstboot</stage>
<label>Channel Upgrade</label>
<mode>installation</mode>
<modules config:type="list">
<module>
<label>upgrade</label>
<enabled config:type="boolean">true</enabled>
<name>channel-upgrade-oes</name>
</module>
</modules>
</workflow>
</workflows>
</productDefines>
EndOfText