<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Cornwell, Piers T wrote:
<blockquote
 cite="mid2575D6851C792245BAAF92058766EF197A206A@icex2.ic.ac.uk"
 type="cite">
  <meta http-equiv="Context-Type" content="text/html; charset=us-ascii">
  <div><span> During the %post install section of our install we run
rhnreg_ks with the appropriate options to register the system with RHN
however when systems are rebuilt, which happens quite often, a new
registration gets created (with the same profile name - the machine's
hostname - but a different ID). </span></div>
  <div><span> </span> </div>
  <div><span> Since it's not practical for us to manually delete old
profiles, is there any way to write a script to query RHN to see if a
profile with this hostname already exists, and if so, to delete it
before creating the new registration (or even to force it to use the
old system ID)? </span></div>
  <pre wrap="">
  </pre>
</blockquote>
The easiest way is to create a tar file of /etc/sysconfig/rhn and
extraxt this file after your system is rebuild.<br>
<br>
<br>
<pre class="moz-signature" cols="72">

--
Dr. Günter Schmidt   |   E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:gsc@bruker.de">gsc@bruker.de</a>
NMR Software         |   Tel: +49 721 5161 443
Bruker BioSpin GmbH  |   Fax: +49 721 5161 480
</pre>
</body>
</html>