From f8241bbbba8da91434cb56c3f6c4668a0b226df7 Mon Sep 17 00:00:00 2001 From: cimryan Date: Tue, 30 Oct 2018 15:30:49 -0700 Subject: [PATCH] Make setup_logfile and headless_setup local to setup_progress --- setup/pi/create-backingfiles-partition.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup/pi/create-backingfiles-partition.sh b/setup/pi/create-backingfiles-partition.sh index 3b658a6..81a29b1 100644 --- a/setup/pi/create-backingfiles-partition.sh +++ b/setup/pi/create-backingfiles-partition.sh @@ -1,13 +1,11 @@ #!/bin/bash -eu - - function setup_progress () { - SETUP_LOGFILE=/boot/teslausb-headless-setup.log - HEADLESS_SETUP=${HEADLESS_SETUP:-false} - if [ $HEADLESS_SETUP = "true" ] + local setup_logfile=/boot/teslausb-headless-setup.log + local headless_setup=${HEADLESS_SETUP:-false} + if [ $headless_setup = "true" ] then - echo "$( date ) : $1" >> "$SETUP_LOGFILE" + echo "$( date ) : $1" >> "$setup_logfile" fi echo $1 }