From 9c9259c0ca377a1cc5f7fa1c05bf5701e08b4d42 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Fri, 18 Nov 2022 16:55:35 +0000 Subject: [PATCH] rpi-update: Avoid warning when vcgencmd not present --- rpi-update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpi-update b/rpi-update index 1d82db4..f9df64d 100755 --- a/rpi-update +++ b/rpi-update @@ -26,7 +26,11 @@ fi BRANCH=${BRANCH:-"master"} ROOT_PATH=${ROOT_PATH:-"/"} -CUR_FW_SUBDIR="/$(echo =$(vcgencmd get_config os_prefix) | cut -d'=' -f3)" +if command -v vcgencmd > /dev/null; then + CUR_FW_SUBDIR="/$(echo =$(vcgencmd get_config os_prefix) | cut -d'=' -f3)" +else + CUR_FW_SUBDIR="/" +fi FW_SUBDIR=${FW_SUBDIR:-${CUR_FW_SUBDIR}} if [[ "${FW_SUBDIR}" != "" ]]; then if [[ "${FW_SUBDIR::1}" != "/" ]]; then