From 6f0cdf042dc177ecc0248f4fcfedcdb3f6fe6fb2 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Fri, 20 Jan 2017 18:27:39 -0500 Subject: [PATCH] docker-min: make our rm commands verbose --- fedora-docker-base-minimal.ks | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fedora-docker-base-minimal.ks b/fedora-docker-base-minimal.ks index 6d30e38..9f2ad2c 100644 --- a/fedora-docker-base-minimal.ks +++ b/fedora-docker-base-minimal.ks @@ -53,23 +53,22 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch echo "# fstab intentionally empty for containers" > /etc/fstab # Remove machine-id on pre generated images -rm -f /etc/machine-id +rm -fv /etc/machine-id touch /etc/machine-id # remove some random help txt files -rm usr/share/gnupg/help*.txt -f - +rm -fv usr/share/gnupg/help*.txt # Pruning random things rm usr/lib/rpm/rpm.daily -rm usr/lib64/nss/unsupported-tools/ -rf # unsupported +rm -rfv usr/lib64/nss/unsupported-tools/ # unsupported # Statically linked crap -rm usr/sbin/{glibc_post_upgrade.x86_64,sln} +rm -fv usr/sbin/{glibc_post_upgrade.x86_64,sln} ln usr/bin/ln usr/sbin/sln # Final pruning -rm -rf var/cache/* var/log/* tmp/* +rm -rfv var/cache/* var/log/* tmp/* %end @@ -94,7 +93,7 @@ chroot /mnt/sysimage install -d /run/lock -m 0755 -o root -g root # NOTE: run this in nochroot because "find" does not exist in chroot KEEPLANG=en_US for dir in locale i18n; do - find /mnt/sysimage/usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rf {} + + find /mnt/sysimage/usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rfv {} + done %end