This repository was archived by the owner on Jan 16, 2024. It is now read-only.
  
  
  
  
  
Description
I think it would be nice to provide single cleanup script, for remove all sensitive information from the images after preparation.
I leave there a few examples that can go in there.
Linux
Clean package cache:
# Ubuntu / Debian
apt-get clean all
# Centos
yum clean all
# Alpine
rm -rf /var/cache/apk/*
# openSUSE
zypper clean --all
Remove root password
Remove network configuration
# Ubuntu / Debian
# TODO
# Centos
# TODO
# Alpine
# TODO
# openSUSE
rm -f /etc/sysconfig/network/ifcfg-eth*
rm -f /etc/sysconfig/network/routes
sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/=""/' /etc/sysconfig/network/config
sed -i '/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/=""/' /etc/sysconfig/network/config
sed -i '/^ *[^#]/d' /etc/resolv.conf
Remove DNS configuration
sed -i '/^ *[^#]/d' /etc/resolv.conf
Clear bash/ash history:
Remove host ssh keys:
rm -f /mnt/etc/ssh/ssh_host_* 
Something else?
Windows
Clean opennebula-contextulization logs:
rm -force C:\.opennebula-context.out
- Run sysprep - it's already cleaning everything well