check_large_files: fixes neglected disk status of /boot2

Ignoring this partition made kinstall fail with a disk-full error.
Important to update kinstall to handle /boot2 refresh as well.

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
This commit is contained in:
Jed Reynolds
2021-11-03 22:11:27 -07:00
parent 8a0b5c22f0
commit c469fa5426

View File

@@ -339,6 +339,14 @@ clean_old_kernels() {
echo "/lib/modules/$f"
done | xargs rm -rf
fi
if [ -d "/boot2" ]; then
rm -rf /boot2/*
rsync -a /boot/. /boot2/
local dev2=`df /boot2/ |awk '/dev/{print $1}'`
if [ x$dev2 != x ]; then
/usr/sbin/grub2-install $dev2 ||:
fi
fi
}
clean_core_files() {
@@ -348,7 +356,7 @@ clean_core_files() {
return 0
fi
local counter=0
local counter=0
if [ ! -f "$lf_core_log" ]; then
touch "$lf_core_log"
fi