mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Better naming of headless_setup functions
This commit is contained in:
@@ -21,7 +21,7 @@ function setup_progress () {
|
|||||||
echo $1
|
echo $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function headless_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" ]
|
||||||
then
|
then
|
||||||
@@ -29,22 +29,30 @@ function headless_populate_variables () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function headless_mark_setup_failed () {
|
function headless_setup_mark_setup_failed () {
|
||||||
setup_log "ERROR: Setup Failed."
|
if [ $HEADLESS_SETUP = "true" ]
|
||||||
touch /boot/TESLAUSB_SETUP_FAILED
|
|
||||||
}
|
|
||||||
|
|
||||||
function headless_mark_setup_success () {
|
|
||||||
if [ -e /boot/TESLAUSB_SETUP_FAILED ]
|
|
||||||
then
|
then
|
||||||
rm /boot/TESLAUSB_SETUP_FAILED
|
setup_log "ERROR: Setup Failed."
|
||||||
|
touch /boot/TESLAUSB_SETUP_FAILED
|
||||||
fi
|
fi
|
||||||
rm /boot/TESLAUSB_SETUP_STARTED
|
|
||||||
touch /boot/TESLAUSB_SETUP_FINISHED
|
|
||||||
setup_log "Main setup completed. Remounting file systems read only."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function headless_progress_flash () {
|
function headless_setup_mark_setup_success () {
|
||||||
|
if [ $HEADLESS_SETUP = "true" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
if [ -e /boot/TESLAUSB_SETUP_FAILED ]
|
||||||
|
then
|
||||||
|
rm /boot/TESLAUSB_SETUP_FAILED
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm /boot/TESLAUSB_SETUP_STARTED
|
||||||
|
touch /boot/TESLAUSB_SETUP_FINISHED
|
||||||
|
setup_log "Main setup completed. Remounting file systems read only."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function headless_setup_progress_flash () {
|
||||||
if [ $HEADLESS_SETUP = "true" ]
|
if [ $HEADLESS_SETUP = "true" ]
|
||||||
then
|
then
|
||||||
/etc/stage_flash $1
|
/etc/stage_flash $1
|
||||||
@@ -220,6 +228,8 @@ function make_root_fs_readonly () {
|
|||||||
/tmp/make-root-fs-readonly.sh
|
/tmp/make-root-fs-readonly.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
headless_setup_populate_variables
|
||||||
|
|
||||||
setup_progress "Verifying environment variables..."
|
setup_progress "Verifying environment variables..."
|
||||||
|
|
||||||
RSYNC_ENABLE="${RSYNC_ENABLE:-false}"
|
RSYNC_ENABLE="${RSYNC_ENABLE:-false}"
|
||||||
@@ -283,7 +293,9 @@ create_usb_drive_backing_files
|
|||||||
configure_rc_local
|
configure_rc_local
|
||||||
|
|
||||||
configure_hostname
|
configure_hostname
|
||||||
headless_mark_setup_success
|
|
||||||
|
headless_setup_mark_setup_success
|
||||||
|
|
||||||
make_root_fs_readonly
|
make_root_fs_readonly
|
||||||
|
|
||||||
echo "All done."
|
echo "All done."
|
||||||
|
|||||||
Reference in New Issue
Block a user