Script to download TL and SP for AIX using NIM and SUMA

Well, we know IBM’s fix central exists and you can register and download any Tls, SPs or efixes among tons of important information but sometimes it is slow, difficult to download it. So, using a tool from IBM known as S.U.M.A (Service Update Management Assistant) we’ll able to download any TLs/SPs/APARs and in the same time create a lpp_source on NIM server.

I have made s simple script to download it form a NIM server and it automatically create the lpp_source.

Here’s the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/ksh
#
# Copyright (C) 2012 Israel Garcia iga3725 @ yahoo.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.
#
# This script automatically download TL and SP and create a LPP resource on
# the nim server.
# In this example, we're going to:
# 1- download from fix central AIX 7.1's TL3-SP3 to a directory on NIM.
# 2- create a lpp_source on NIM server from the above directory.
#
mkdir /SOME_PATH/images/aix71latest &gt;/dev/null</code>
 
AIXPackages=/SOME_PATH/images/aix71latest
 
# Deleting old files
rm -f "$AIXPackages"/*
 
# Download code from fix central
suma -x -a RqType=TL -a RqName=7100-03 -a FilterML=7100-00 -a DLTarget="$AIXPackages"
suma -x -a RqType=SP -a RqName=7100-03-03 -a FilterML=7100-03 -a DLTarget="$AIXPackages"
 
if [[ $? -ne 0 ]];then exit 127
fi
 
inutoc "$AIXPackages"/
mv "$AIXPackages"/installp/ppc/*.bff "$AIXPackages"
rm "$AIXPackages"/installp/ppc/.toc
rmdir "$AIXPackages"/installp/ppc/
rmdir "$AIXPackages"/installp/
 
# Create LPP resource on NIM
nim -o remove LPP_aix71latest
nim -o define -t lpp_source -a server=master -a location="$AIXPackages" LPP_aix71latest
 
# Renaming files *.bff
bffcreate -c -d "$AIXPackages"
# End

Don’t forget to set HTTP_PROXY variable if your behind a firewall.

Please see the whole info regarding NIM and SUMA.

http://www14.software.ibm.com/webapp/set2/sas/f/best/Managing_AIX_Updates_Best_Practices.pdf

Hope this helps.

Just thanks if the post was helpful

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Understanding dump devices sysdumpdev
Viewed 4249 times since Mon, Jul 9, 2018
AIX Booting
Viewed 9927 times since Tue, Apr 16, 2019
Part 2, Monitoring memory usage (ps, sar, svmon, vmstat) and analyzing the results AIX7
Viewed 12227 times since Wed, Jun 19, 2019
AIX: Script to get Total Disk Size
Viewed 3329 times since Tue, Jun 12, 2018
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 3498 times since Fri, Jun 8, 2018
AIX - How to get IP and MAC address of ethernet adapter in AIX
Viewed 23326 times since Fri, Jun 8, 2018
AIX FC Performance improvements for IBM AIX FC and FCoE device driver stacks
Viewed 5321 times since Fri, Jan 31, 2020
O’Reilly’s CD bookshelf
Viewed 11400 times since Wed, Jun 27, 2018
Create volume groups on AIX - Normal Big Scalable
Viewed 6444 times since Thu, Feb 21, 2019
Aix: How to assign a specific PVID
Viewed 6687 times since Fri, Feb 1, 2019