#!/bin/bash
#Network test
echo "Network test"
ping -c 1 -W 1 ubuntu.com &>/dev/null
if [ $? -ne 0 ];then echo "Network err!" ; exit 1; fi
#User testing
if [ `whoami` != "root" ];then
        echo "Is not the root user !"
        echo "Please switch the root user !"
        exit 0;
fi
sudo ntpdate -u 10.0.2.2
sudo hwclock -w
