From 3cdd4c24c5fa8e40f6c88fd28f69b3bb7da4df2e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 13 Dec 2024 19:17:21 -0600 Subject: [PATCH] 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. --- install-update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-update.sh b/install-update.sh index 92d9eee..9192af6 100755 --- a/install-update.sh +++ b/install-update.sh @@ -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 )