[rhn-users] Determining whether RHEL4 is registered?
Timothy Kallinis
timothyk at xandros.com
Mon Nov 5 19:49:13 UTC 2007
Hi, I have an interesting dilemma regarding registration with up2date in
RHEL4. I have a yum (yum-arch) repo I want to use under RHEL4 with
up2date. However, if a system is not registered, I need to comment out the
following line:
up2date default
in /etc/sysconfig/rhn/sources
I need to do this in an automated way via a rpm I install on the target
system. Is there some way I can determine the registration state? Perhaps
there's a utility or tell-tale file I can consult to do this?
The best I could do is run the following command:
up2date --showall
If the system is not registered then a message to that effect is printed
and the exit code is non-zero. However, I'm not sure what happens with a
registered system when the network is down.
Maybe I should ask this question on the Red Hat System Administrators'
list, but I thought I would give this list a try first.
Regards,
Timothy
More information about the rhn-users
mailing list