initial commit
This commit is contained in:
parent
b916d56285
commit
51a028e634
6 changed files with 182 additions and 1 deletions
44
vm-seal.sh
Normal file
44
vm-seal.sh
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
# /usr/local/sbin/vm-seal.sh
|
||||
|
||||
unset HISTFILE
|
||||
|
||||
yum update -y
|
||||
yum clean all -y
|
||||
|
||||
: > /etc/machine-id
|
||||
hostnamectl set-hostname localhost.localdomain
|
||||
systemctl enable vm-firstrun
|
||||
|
||||
rm -f /etc/ssh/ssh_host_*
|
||||
|
||||
rm -rf /root/.ssh/
|
||||
rm -f /root/anaconda-ks.cfg
|
||||
rm -f /root/.bash_history
|
||||
|
||||
rm -f /home/centos/.bash_history
|
||||
rm -f /home/centos/.ssh/known_hosts
|
||||
|
||||
rm -f /var/log/boot.log
|
||||
rm -f /var/log/cron
|
||||
rm -f /var/log/dmesg
|
||||
rm -f /var/log/grubby
|
||||
rm -f /var/log/lastlog
|
||||
rm -f /var/log/maillog
|
||||
rm -f /var/log/messages
|
||||
rm -f /var/log/secure
|
||||
rm -f /var/log/spooler
|
||||
rm -f /var/log/tallylog
|
||||
rm -f /var/log/wpa_supplicant.log
|
||||
rm -f /var/log/wtmp
|
||||
rm -f /var/log/yum.log
|
||||
rm -f /var/log/audit/audit.log
|
||||
rm -f /var/log/tuned/tuned.log
|
||||
|
||||
updatedb
|
||||
|
||||
touch /.autorelabel
|
||||
|
||||
sys-unconfig
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue