From 197300b6c102ee1a2ce13cec94b7834ad282c543 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Sat, 5 Sep 2020 22:46:11 +0000 Subject: [PATCH] 40-install: fix missing brackets Without the brackets, the shell will try to execute "$ARL" as if it were a program, giving the error: 123456789: command not found --- root/etc/cont-init.d/40-install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/40-install b/root/etc/cont-init.d/40-install index 53033c4..859fc4e 100644 --- a/root/etc/cont-init.d/40-install +++ b/root/etc/cont-init.d/40-install @@ -14,8 +14,9 @@ fi # if the arl was previously set but is out of date, update the file with the arl from the env variable if [ ${#ARL} -gt 10 ]; then - OLDARL=$(cat /config/.arl) - if $ARL -ne $OLDARL; then + # this file might not exist; happens when the users runs for the first time + OLDARL=$(cat /config/.arl 2>/dev/null || echo 0) # ignore if the file doesn't exist + if [ "$ARL" != "$OLDARL" ]; then echo "[cont-init.d] !!! ARL from environment variable does not match current ARL. Using environment variable. !!!" echo "[cont-init.d] !!! Please update your ARL in the variable instead of the webinterface or remove the ARL from the container call. !!!" printf $ARL > /config/.arl