Monday, 18 August 2008

Script doesn't work for double line version

It is not like I'm working ful time on OID Authentication for Operating Systems. Just part time for a certain customer. For other customers I do IDM and security architecting. But some how these nitty gritty details seem more blog material.
We are roling this out for multiple linux servers and it turned out taht for some servers the client script of OA4OS wasn't working. After debugging and tracing it turned out that the /etc/redhat-release version file of these two servers was different.
Instead of
cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 5)

Like on the other servers the response was:
cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4
Enterprise Linux Enterprise Linux AS release 4 (October Update 5)


Which lets the awk scrip collect a 4 newline 4 in stead of just 4:

cat /etc/redhat-release awk '{print $7}'
4
4

Then the /usr/bin/authconfig isnot executed because the if statement that needs to be true before this statement checks for a version equal to 4 of 5 and not for equal to 4 newline 4.

We solved this issue by removing the first line in the version file. Somehow at the installation of OEL the line was added instead of updated. This was just for two machines, the OID cluster, in the whole infrastructure of 20 machines.

You would ask, why would there be the double line in the version file ? That is because the Oracle Internet Directory (OID) doesn't install on Enterprise Linux yet. But does install on "Red Hat Enterprise Linux AS release 4".
The test we have done was on the same machine(s) we installed the OID on. The other machines didn't have the version file change and therefore didn't have the install problem.

No comments: