From dd73c50dc5439c3e16f1322dce69b1f17af485da Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 13 Oct 2011 23:20:27 +0100 Subject: [PATCH] virt-sysprep: Add rhn-systemid. --- TODO | 2 +- clone/virt-sysprep.in | 7 +++++++ clone/virt-sysprep.pod | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index a82ad57..bfc6136 100644 --- 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 diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in index 981ed96..0262015 100644 --- a/clone/virt-sysprep.in +++ b/clone/virt-sysprep.in @@ -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 diff --git a/clone/virt-sysprep.pod b/clone/virt-sysprep.pod index fa10b9e..98270c1 100755 --- a/clone/virt-sysprep.pod +++ b/clone/virt-sysprep.pod @@ -199,6 +199,10 @@ the guest. See C below. +=head2 rhn-systemid + +Remove the RHN system ID. + =head2 smolt-uuid Remove the Smolt hardware UUID. -- 1.8.3.1