In our environment, only one of our AIX servers is permitted to access the internet through the firewall. On this one server, I use suma to download all fixes for all base levels, technology levels and service packs that we have in our environment; this is done daily.
Once a month, I copy all fixes together in one folder per base level and I use inutoc
to create a couple repositories that are frozen and that can be used to patch all of our AIX servers. This way we can ensure all servers are on the same oslevel. We call this a "monthly patchset".
We have a CSV file that lists all kernel versions for each "monthly patchset" for all of our UNIX/Linux OS flavors. That CSV file is used by our patching / validation scripts. For Linux / Solaris I've found "tricks" to determine the kernel version from the repository files themselves, but on AIX I'm failing to figure out the oslevel without actually patching a server with it. After patching, I can run 'oslevel -s' to figure the oslevel, but that is too late, as our patching scripts use / require the oslevel before starting the actual patching.
Does anyone know a trick to accomplish this? I've tried the following so far:
- Our repository folder contains many *.bff files, which are binary files, so inside those files I can't find the oslevel
- The *.bff file names are mostly 'U' followed by some numbers and '.bff' (so not usable for determining the oslevel). But some filenames actually do contain (parts of) the oslevel in the filename. For example: 7200-01-06.bff 7200-02-01-1732.bff 7200-02-06.bff 7200-03-06.bff 7200-03.bff 7200-04-01.bff 7200-04-02.bff 7200-04-03.bff 7200-04.bff 7200-05-01.bff 7200-05-02.bff 7200-05.bff. However, as you can see, from the latest oslevels, the 'build date' part is missing in the filename.
- We patch using the
install_all_updates -Y -d <path_to_repo>
command. I've tried using install_all_updates -p -d <path_to_repo>
, hoping that it would be visible somewhere in the output, but it isn't.
- I've also tried
installp -[lL] -d <path_to_repo>
, but also there the oslevel isn't visible.
I hope someone can assist me with this.
Edit below (as a response to @Jeff Schaller his answer)
Thanks a lot for your assistance!
It's very close to matching, but not exactly I'm afraid...
--> installp -L -d /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511 | grep :bos\.rte\.install: | sort -t: -k17n | tail -1 | awk -F: '{print $3, $17}'
7.2.4.2 1937
root@servername /nim/export
--> oslevel -s
7200-04-01-1939
root@servername /nim/export
Not sure why though... Any idea?
More detail:
--> installp -L -d /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511 | grep 1937 | wc -l
613
root@servername /nim/export
--> installp -L -d /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511 | grep 1939 | wc -l
0
root@servername /nim/export
-->
So I thought that there must be some package installed with a builddate of 1939 that is causing 'oslevel-s' to display that builddate. So I ran following commands to find this package:
--> lslpp -Lc all | awk -F':' '{print $2" "$3" "$18}' | grep 1937 | wc -l
288
root@servername /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511
--> lslpp -Lc all | awk -F':' '{print $2" "$3" "$18}' | grep 1939 | wc -l
0
root@servername /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511
--> oslevel -s
7200-04-01-1939
root@servername /nim/export/repos/AIX/AIX7200_OS-Vendor_Repo_20200511
-->
As you can see, I wasn't able to find this package... :(
Edit #2 below (as a response to @Jeff Schaller his comment)
root@servername /
--> instfix -ic | grep 7200-04 | grep :-:
root@servername /
That didn't come back with anything I'm afraid.
Also I'm not sure what you mean exactly with "... server is back-leveled from the expected oslevel...". Isn't it the opposite? 'oslevel -s' gives back 1939 as build date, while all packages indicate that the build date should be 1937. Isn't that "front-leveled" then?