File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22source ' scripts/common/filesystem.sh'
3+ source " ${REPO_SCRIPTS_COMMON_DIR} /common.sh"
4+
5+ PREFERRED_TIMEZONE=' Europe/Bucharest'
36
47LOCALE_CONF_FILE_PATH=" ${ROOT_ETC} /locale.conf"
58LOCALTIME_FILE_PATH=" ${ROOT_ETC} /localtime"
@@ -9,9 +12,12 @@ echo 'Setting up the time locale...'
912 echo ' LC_TIME=ro_RO.UTF-8'
1013} > " ${LOCALE_CONF_FILE_PATH} "
1114
12- if [ ! -f " ${LOCALTIME_FILE_PATH} " ]; then
15+ if does_bin_exist ' timedatectl' ; then
16+ run_as_su timedatectl set-timezone " ${PREFERRED_TIMEZONE} "
17+ elif [ ! -f " ${LOCALTIME_FILE_PATH} " ]; then
1318 echo ' Setting up the local time...'
1419
15- ln -sf ' /usr/share/zoneinfo/Europe/Bucharest' " ${LOCALTIME_FILE_PATH} "
16- does_bin_exist ' hwclock' && hwclock --systohc
20+ ln -sf " ${ROOT_USER_SHARE} /zoneinfo/${PREFERRED_TIMEZONE} " " ${LOCALTIME_FILE_PATH} "
1721fi
22+
23+ does_bin_exist ' hwclock' && hwclock --systohc
You can’t perform that action at this time.
0 commit comments