Hung-Wei Chiu | 9708ed8 | 2021-04-14 14:20:08 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # SPDX-License-Identifier: EPL-1.0 |
| 3 | ############################################################################## |
| 4 | # Copyright (c) 2016 The Linux Foundation and others. |
| 5 | # |
| 6 | # All rights reserved. This program and the accompanying materials |
| 7 | # are made available under the terms of the Eclipse Public License v1.0 |
| 8 | # which accompanies this distribution, and is available at |
| 9 | # http://www.eclipse.org/legal/epl-v10.html |
| 10 | ############################################################################## |
| 11 | # Cleans up VM as preparation for image snapshotting |
| 12 | |
| 13 | # vim: sw=2 ts=2 sts=2 et : |
| 14 | |
| 15 | rm -rf ~/.viminfo \ |
| 16 | /etc/Pegasus/*.cnf \ |
| 17 | /etc/Pegasus/*.crt \ |
| 18 | /etc/Pegasus/*.csr \ |
| 19 | /etc/Pegasus/*.pem \ |
| 20 | /etc/Pegasus/*.srl \ |
| 21 | /etc/ssh/ssh*key* \ |
| 22 | /root/.ssh/* \ |
| 23 | /root/anaconda-ks.cfg \ |
| 24 | /root/anaconda-post.log \ |
| 25 | /root/initial-setup-ks.cfg \ |
| 26 | /root/install.log \ |
| 27 | /root/install.log.syslog \ |
| 28 | /tmp/packer \ |
| 29 | /var/cache/fontconfig/* \ |
| 30 | /var/cache/gdm/* \ |
| 31 | /var/cache/man/* \ |
| 32 | /var/lib/AccountService/users/* \ |
| 33 | /var/lib/cloud/* \ |
| 34 | /var/lib/fprint/* \ |
| 35 | /var/lib/logrotate.status \ |
| 36 | /var/log/*.log* \ |
| 37 | /var/log/BackupPC/LOG \ |
| 38 | /var/log/ConsoleKit/* \ |
| 39 | /var/log/anaconda.syslog \ |
| 40 | /var/log/anaconda/* \ |
| 41 | /var/log/apache2/*_log \ |
| 42 | /var/log/apache2/*_log-* \ |
| 43 | /var/log/apt/* \ |
| 44 | /var/log/aptitude* \ |
| 45 | /var/log/audit/* \ |
| 46 | /var/log/btmp* \ |
| 47 | /var/log/ceph/*.log \ |
| 48 | /var/log/chrony/*.log \ |
| 49 | /var/log/cron* \ |
| 50 | /var/log/cups/*_log \ |
| 51 | /var/log/debug* \ |
| 52 | /var/log/dmesg* \ |
| 53 | /var/log/exim4/* \ |
| 54 | /var/log/faillog* \ |
| 55 | /var/log/gdm/* \ |
| 56 | /var/log/glusterfs/*glusterd.vol.log \ |
| 57 | /var/log/glusterfs/glusterfs.log \ |
| 58 | /var/log/httpd/*log \ |
| 59 | /var/log/installer/* \ |
| 60 | /var/log/jetty/jetty-console.log \ |
| 61 | /var/log/journal/* \ |
| 62 | /var/log/lastlog* \ |
| 63 | /var/log/libvirt/libvirtd.log \ |
| 64 | /var/log/libvirt/lxc/*.log \ |
| 65 | /var/log/libvirt/qemu/*.log \ |
| 66 | /var/log/libvirt/uml/*.log \ |
| 67 | /var/log/lightdm/* \ |
| 68 | /var/log/mail/* \ |
| 69 | /var/log/maillog* \ |
| 70 | /var/log/messages* \ |
| 71 | /var/log/ntp \ |
| 72 | /var/log/ntpstats/* \ |
| 73 | /var/log/ppp/connect-errors \ |
| 74 | /var/log/rhsm/* \ |
| 75 | /var/log/sa/* \ |
| 76 | /var/log/secure* \ |
| 77 | /var/log/setroubleshoot/*.log \ |
| 78 | /var/log/spooler* \ |
| 79 | /var/log/squid/*.log \ |
| 80 | /var/log/syslog* \ |
| 81 | /var/log/tallylog* \ |
| 82 | /var/log/tuned/tuned.log \ |
| 83 | /var/log/wtmp* \ |
| 84 | /var/named/data/named.run |
| 85 | |
| 86 | # Force a system sync and sleep to get around any SSD issues |
| 87 | echo "Forcing sync and sleep for 10sec" |
| 88 | sync |
| 89 | sleep 10 |