From a7977b9960634825b469d0b8e952870db199c61d Mon Sep 17 00:00:00 2001 From: Terry Tsang Date: Wed, 26 Aug 2020 22:20:23 +0800 Subject: [PATCH] Fix log removal --- pishrink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pishrink.sh b/pishrink.sh index 623f736..dbf6b09 100755 --- a/pishrink.sh +++ b/pishrink.sh @@ -308,7 +308,7 @@ if [[ $prep == true ]]; then info "Syspreping: Removing logs, apt archives, dhcp leases and ssh hostkeys" mountdir=$(mktemp -d) mount "$loopback" "$mountdir" - rm -rf "$mountdir/var/cache/apt/archives/*" "$mountdir/var/lib/dhcpcd5/*" "$mountdir/var/log/*" "$mountdir/var/tmp/*" "$mountdir/tmp/*" "$mountdir/etc/ssh/*_host_*" + rm -rvf $mountdir/var/cache/apt/archives/* $mountdir/var/lib/dhcpcd5/* $mountdir/var/log/* $mountdir/var/tmp/* $mountdir/tmp/* $mountdir/etc/ssh/*_host_* umount "$mountdir" fi