From d2204c729051499b260d59fabc0be6862c853041 Mon Sep 17 00:00:00 2001 From: Aaron Murray Date: Wed, 24 Feb 2021 19:23:46 -0600 Subject: [PATCH] skip awk if model file doesn't exist --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 69dcfef..d5b1850 100755 --- a/install +++ b/install @@ -328,7 +328,8 @@ echo "Disabling data collection ..." /usr/sbin/omv-rpc -u admin "config" "applyChanges" '{ "modules": ["monit","rrdcached","collectd"],"force": true }' # set min/max frequency and watchdog for RPi boards -if [[ $(awk '{ print $1 }' /proc/device-tree/model) = "Raspberry" ]]; then +rpi_model="/proc/device-tree/model" +if [ -f "${rpi_model}" ] && [[ $(awk '{ print $1 }' ${rpi_model}) = "Raspberry" ]]; then omv_set_default "OMV_WATCHDOG_DEFAULT_MODULE" "bcm2835_wdt" omv_set_default "OMV_WATCHDOG_CONF_WATCHDOG_TIMEOUT" "14"