Index: scripts/setup.sh =================================================================== diff -u -rd4988df80c5d03fe46e42c9563043ae281247278 -rb9654575709e02aecc01a01d246d7af578679387 --- scripts/setup.sh (.../setup.sh) (revision d4988df80c5d03fe46e42c9563043ae281247278) +++ scripts/setup.sh (.../setup.sh) (revision b9654575709e02aecc01a01d246d7af578679387) @@ -83,7 +83,7 @@ timedatectl set-local-rtc $TDCTL_RTC_LOCL } -function set_datetime() { +function set_datetime() { echo "Setup the time/date" while true; do timedatectl set-time "$DATETIME" 1>/dev/null 2>/dev/null @@ -127,6 +127,15 @@ update-rc.d $INITD_AUTOSTART defaults } +function manufacturingMode() { + if [ "$(grep $SETUP_ENABLE_MANUFACTURING_MODE $SETUP_CONF_FILE)" != "" ]; then + # -E for Maunufacturing mode + # -a for disabling the non-minimizable Alarms + APPLICATION_PARAMS="-E -a" # don't use '&', we have to wait until user is done with UI + applicationPOST + fi +} + function confirm_reboot() { read -p "ready to reboot? [y,n]" -n 1 -r CONFIRM if [ "$CONFIRM" == "y" ]; then @@ -136,6 +145,12 @@ echo "" } +function cleanup() { + rm $SETUP_CONF_FILE + rm $(basename $0) + rm -frd $HOME/.ssh +} + function main() { disable_autostart format_sdcard @@ -144,6 +159,8 @@ diable_b2qt_services setup_denali enable_autostart + manufacturingMode + cleanup } main "$1" "$2"