Re: Determining whether RHEL4 is registered?

Timothy Kallinis <[email protected]>
Newsgroups gmane.linux.redhat.rhn.user
Message-ID <[email protected]>
On Wed, 7 Nov 2007, Alfred Hovdestad wrote:

> You should have a system_id in /etc/sysconfig/rhn/systemid.  That system_id 
> is generated when you register with RHN.  If you go to rhn.redhat.com, you 
> can look up your server and it should have the same system_id.  We have had 
> severs registered multiple times and the only way we found to identify the 
> last registration is by using the system_id.
>
>  Alfred Hovdestad, RHCE
>  University of Saskatchewan

Alfred, thanks for the info. I think this is what I need. Actually, I just 
noticed another file that could prove useful. I used a minimal RHEL4 
VMWare image for my initial testing and there weren't any tell-tale 
registration files under /etc/sysconfig/rhn. I've now tried a VMWare image 
of a full RHEL4 installation and I noticed the empty file:

/etc/sysconfig/rhn/rhn_register_remind

which did not exist in my initial minimal RHEL4 environment for whatever 
reason. I guess this file got deleted somehow since the system wasn't 
registered?

Anyhow, I think it would be better to use the systemid file to check for 
registration as you suggested; however, I don't want to check 
rhn.redhat.com for the registration status since I can't assume the server 
will be online when my package is installed. My package is actually on a 
CD. This is the logic I intend to use in the postinst scriptlet of my 
package:

If /etc/sysconfig/rhn/systemid exists then the system is registered 
otherwise it is not. Do you think this is sufficient? Also is the filename 
systemid or system_id? I don't have any registered systems at the moment, 
so I can't confirm this.

Regards,

Timothy Kallinis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.