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.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user