virt-sysprep: Add rhn-systemid.

This commit is contained in:
Richard W.M. Jones
2011-10-13 23:20:27 +01:00
parent 9e382f1ae3
commit dd73c50dc5
3 changed files with 12 additions and 1 deletions

2
TODO
View File

@@ -537,7 +537,7 @@ virt-sysprep ideas
------------------
- touch /.unconfigured ?
- Spacewalk / RHN ID
- other Spacewalk / RHN IDs (?)
- Kerberos keys
- Puppet registration
- user accounts

View 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

View File

@@ -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.