summaryrefslogtreecommitdiffstats
path: root/clone
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-10-13 23:20:27 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-13 23:21:12 +0100
commitdd73c50dc5439c3e16f1322dce69b1f17af485da (patch)
treea2d8a75914fdd794b901b83ed90e97133dc2b718 /clone
parent9e382f1ae33ed25f012596b801e9cc4a440cb74b (diff)
downloadlibguestfs-dd73c50dc5439c3e16f1322dce69b1f17af485da.tar.gz
libguestfs-dd73c50dc5439c3e16f1322dce69b1f17af485da.tar.xz
libguestfs-dd73c50dc5439c3e16f1322dce69b1f17af485da.zip
virt-sysprep: Add rhn-systemid.
Diffstat (limited to 'clone')
-rw-r--r--clone/virt-sysprep.in7
-rwxr-xr-xclone/virt-sysprep.pod4
2 files changed, 11 insertions, 0 deletions
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index 981ed964..02620155 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 fa10b9ea..98270c1e 100755
--- a/clone/virt-sysprep.pod
+++ b/clone/virt-sysprep.pod
@@ -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.