Update Visual Set Time

This commit is contained in:
MatMoul 2020-04-03 22:46:56 +02:00
parent 946812b3f8
commit cc281cf08f

36
archfi
View file

@ -1136,13 +1136,33 @@ archsettime(){
ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime
pressanykey pressanykey
if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then options=()
clear options+=("UTC" "")
archchroot settimeutc options+=("Local" "")
else sel=$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "${txthwclock}" 0 0 0 \
clear "${options[@]}" \
archchroot settimelocal 3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
return 1
fi fi
clear
case ${sel} in
"${txthwclockutc}")
archchroot settimeutc
;;
"${txthwclocklocal}")
archchroot settimelocal
;;
esac
# if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then
# clear
# archchroot settimeutc
# else
# clear
# archchroot settimelocal
# fi
pressanykey pressanykey
@ -1853,7 +1873,9 @@ loadstrings(){
txtsettime="Set Time" txtsettime="Set Time"
txtsetrootpassword="Set root password" txtsetrootpassword="Set root password"
txtuseutcclock="Use UTC hardware clock ?" txthwclock="Hardware clock :"
txthwclockutc="UTC"
txthwclocklocal="Local"
txtbootloader="Bootloader" txtbootloader="Bootloader"
txtbootloadermenu="Choose your bootloader" txtbootloadermenu="Choose your bootloader"