#!/bin/sh ########################################################################### # # Copyright (c) 2019-2020 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) 13-Mar-2020 # @author (original) Behrouz NematiPour # @date (original) 13-Mar-2020 # ############################################################################ 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 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 timezone (PST)" rm -f /etc/localtime ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 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