瀏覽代碼

adding setup option to set clock to local time

Jake Day 7 年之前
父節點
當前提交
76254749fe
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      setup.sh

+ 11 - 0
setup.sh

@@ -139,6 +139,17 @@ echo "Installing marvell firmware...\n"
 mkdir -p /lib/firmware/mrvl/
 unzip -o firmware/mrvl_firmware.zip -d /lib/firmware/mrvl/
 
+read -rp "Do you want to set your clock to local time instead of UTC? This fixes issues when dual booting with Windows. (type yes or no) " uselocaltime;echo
+
+if [ "$uselocaltime" = "yes" ]; then
+	echo "Setting clock to local time...\n"
+
+	timedatectl set-local-rtc 1
+	hwclock --systohc --localtime
+else
+	echo "Not setting clock"
+fi
+
 read -rp "Do you want this script to download and install the latest kernel for you? (type yes or no) " autoinstallkernel;echo
 
 if [ "$autoinstallkernel" = "yes" ]; then