virt-sysprep: Add rhn-systemid.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 13 Oct 2011 22:20:27 +0000 (23:20 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 13 Oct 2011 22:21:12 +0000 (23:21 +0100)
TODO
clone/virt-sysprep.in
clone/virt-sysprep.pod

diff --git a/TODO b/TODO
index a82ad57..bfc6136 100644 (file)
--- a/TODO
+++ b/TODO
@@ -537,7 +537,7 @@ virt-sysprep ideas
 ------------------
 
  - touch /.unconfigured ?
- - Spacewalk / RHN ID
+ - other Spacewalk / RHN IDs (?)
  - Kerberos keys
  - Puppet registration
  - user accounts
index 981ed96..0262015 100644 (file)
@@ -137,6 +137,7 @@ if [ -z "$enable" ]; then
     logfiles=yes
     net_hwaddr=yes
     random_seed=yes
+    rhn_systemid=yes
     smolt_uuid=yes
     ssh_hostkeys=yes
     udev_persistent_net=yes
@@ -148,6 +149,7 @@ elif [ "$enable" = "list" ]; then
     echo "logfiles"
     echo "net-hwaddr"
     echo "random-seed"
+    echo "rhn-systemid"
     echo "smolt-uuid"
     echo "ssh-hostkeys"
     echo "udev-persistent-net"
@@ -162,6 +164,7 @@ else
             logfiles)              logfiles=yes ;;
             net-hwaddr)            net_hwaddr=yes ;;
             random-seed)           random_seed=yes ;;
+            rhn-systemid)          rhn_systemid=yes ;;
             smolt-uuid)            smolt_uuid=yes ;;
             ssh-hostkeys)          ssh_hostkeys=yes ;;
             udev-persistent-net)   udev_persistent_net=yes ;;
@@ -323,6 +326,10 @@ if [ "$random_seed" = "yes" -a "$type" = "linux" ]; then
     fi
 fi
 
+if [ "$rhn_systemid" = "yes" -a "$type/$distro" = "linux/rhel" ]; then
+    rm -f $mnt/etc/sysconfig/rhn/systemid
+fi
+
 if [ "$smolt_uuid" = "yes" -a "$type" = "linux" ]; then
     rm -f $mnt/etc/sysconfig/hw-uuid
     rm -f $mnt/etc/smolt/uuid
index fa10b9e..98270c1 100755 (executable)
@@ -199,6 +199,10 @@ the guest.
 
 See C</RANDOM SEED> below.
 
+=head2 rhn-systemid
+
+Remove the RHN system ID.
+
 =head2 smolt-uuid
 
 Remove the Smolt hardware UUID.