make cloud-prep.sh more robust

This commit is contained in:
Matthew Thode 2016-01-25 18:40:28 -06:00
parent ae28559033
commit 1fe49e110b
No known key found for this signature in database
GPG key ID: 64A37BEAAE19A4E8

View file

@ -59,7 +59,9 @@ etc-update --automode -5
# Clean up portage
emerge --verbose=n --depclean
eix-update
if [[ -a /usr/bin/eix ]]; then
eix-update
fi
emaint all -f
eselect news read all
eclean-dist --destructive
@ -73,5 +75,7 @@ for i in $(find /var/log -type f); do truncate -s 0 $i; done
find /usr/share/man/ -mindepth 1 -maxdepth 1 -path "/usr/share/man/man*" -prune -o -exec rm -rf {} \;
# fine if this fails, aka non-hardened
echo 'migraging pax'
/usr/sbin/migrate-pax -m
if -a [[ /usr/sbin/migrate-pax ]]; then
echo 'migraging pax'
/usr/sbin/migrate-pax -m
fi