install-update: Do not use find -printf

Busybox `find` does not implement `-printf`.  We have to use `awk` to
get the base name of the file from its path.
dev/gentoo
Dustin 2024-12-13 19:17:21 -06:00
parent 2beae39208
commit 3cdd4c24c5
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ set_default_boot() {
_rc=0
mkdir -p newroot || return
mount -oro "$1" newroot || return
_kernel=$(find newroot/boot -name 'vmlinuz-*' -printf '%P\n' \
_kernel=$(find newroot/boot -name 'vmlinuz-*' \
| awk -F/ '{print $NF}' \
| sort -V \
| tail -n1
)