Skip to content

Commit 19b5ce3

Browse files
committed
extlinux: recycle old /boot/dtbs
1 parent 63a7ece commit 19b5ce3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

root/usr/local/sbin/update-extlinux.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ set -eo pipefail
1313

1414
. /etc/default/extlinux
1515

16+
shopt -s nullglob
17+
18+
for dtb in /boot/dtbs/*; do
19+
version=$(basename "$dtb")
20+
[[ -e "/boot/vmlinuz-$version" ]] && continue
21+
echo "Removing old $dtb..." 1>&2
22+
rm -r "$dtb"
23+
done
24+
1625
echo "Creating new extlinux.conf..." 1>&2
1726

1827
mkdir -p /boot/extlinux/

0 commit comments

Comments
 (0)