#!/bin/sh ########################################################################### # # Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file setup.sh # # @author (last) Behrouz NematiPour # @date (last) 01-Nov-2021 # @author (original) Behrouz NematiPour # @date (original) 13-Mar-2020 # ############################################################################ # @details # This script is part of setting up the newly flashed SoM which will run on the device # after the start.sh script is done copying files on the device. echo "setup the time/date controller" # to use the system time/date and not use the network time protocol timedatectl set-ntp 0 echo "Setup the timezone (UTC)" timedatectl set-timezone UTC echo "Setup the time/date" while true; do read -p "please enter the date (yyyy-MM-dd HH:mm): " -r DATE date -s "$DATE" if [ $? -eq 0 ]; then break fi done echo "Setup the hardware clock" hwclock -w echo "Disabling Qt demo" systemctl disable qtlauncher systemctl disable ebikedata echo "Setting denali as default auto start application" mkdir /etc/init.d/ mv autostart /etc/init.d/ update-rc.d autostart defaults echo "Syncing file system updates" sync read -p "ready to reboot? [y,n]" -n 1 -r CONFIRM if [ "$CONFIRM" == "y" ]; then reboot fi