Put the declaration of setup_progress before its first use.

This commit is contained in:
cimryan
2018-11-03 18:34:11 -07:00
parent d83a9527b6
commit 820d224c28

View File

@@ -6,12 +6,6 @@ HEADLESS_SETUP=${HEADLESS_SETUP:-false}
USE_LED_FOR_SETUP_PROGRESS=true USE_LED_FOR_SETUP_PROGRESS=true
CONFIGURE_ARCHIVING=${CONFIGURE_ARCHIVING:-true} CONFIGURE_ARCHIVING=${CONFIGURE_ARCHIVING:-true}
if ! [ $(id -u) = 0 ]
then
setup_progress "STOP: Run sudo -i."
exit 1
fi
function setup_progress () { function setup_progress () {
local setup_logfile=/boot/teslausb-headless-setup.log local setup_logfile=/boot/teslausb-headless-setup.log
if [ $HEADLESS_SETUP = "true" ] if [ $HEADLESS_SETUP = "true" ]
@@ -21,6 +15,12 @@ function setup_progress () {
echo $1 echo $1
} }
if ! [ $(id -u) = 0 ]
then
setup_progress "STOP: Run sudo -i."
exit 1
fi
function headless_setup_populate_variables () { function headless_setup_populate_variables () {
# Pull in the conf file variables to make avail to this script and subscripts # Pull in the conf file variables to make avail to this script and subscripts
if [ -e /boot/teslausb_setup_variables.conf ] && [ $HEADLESS_SETUP = "true" ] if [ -e /boot/teslausb_setup_variables.conf ] && [ $HEADLESS_SETUP = "true" ]