Index: radix-1.9/libs/glibc/2.37-zoneinfo/2023c/scripts/part-00
===================================================================
--- radix-1.9/libs/glibc/2.37-zoneinfo/2023c/scripts/part-00 (revision 302)
+++ radix-1.9/libs/glibc/2.37-zoneinfo/2023c/scripts/part-00 (revision 303)
@@ -79,9 +79,10 @@
: ${DIALOGRC=${TARGET_ROOT_PATH}etc/dialogrc}
#
-# The hardware clock configuration file:
+# The hardware clock configuration files:
#
HWCLOCK_CONF=${TARGET_ROOT_PATH}etc/hardwareclock
+ADJTIME_CONF=${TARGET_ROOT_PATH}etc/adjtime
#
# setzone( $TIMEZONE )
@@ -95,11 +96,12 @@
cd ${TARGET_ROOT_PATH}etc
if [ -r ${TARGET_ROOT_PATH}usr/share/zoneinfo/$TZ -o \
- -L ${TARGET_ROOT_PATH}usr/share/zoneinfo/$TZ ]; then
+ -L ${TARGET_ROOT_PATH}usr/share/zoneinfo/$TZ ] ; then
ln -sf ../usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime-copied-from
rm -f localtime
+ ln -sf ../usr/share/zoneinfo/$TZ localtime
cd ..
- cp etc/localtime-copied-from etc/localtime
fi
}
@@ -119,6 +121,21 @@
echo $1 >> $HWCLOCK_CONF
}
+write_adjtime()
+{
+ if [ ! -f "$ADJTIME_CONF" ] ; then
+ echo "0.0 0 0.0" > $ADJTIME_CONF
+ echo "0" >> $ADJTIME_CONF
+ echo $1 >> $ADJTIME_CONF
+ else
+ if [ "$1" = "UTC" ] ; then
+ sed -i 's,^LOCAL,UTC,' $ADJTIME_CONF
+ else
+ sed -i 's,^UTC,LOCAL,' $ADJTIME_CONF
+ fi
+ fi
+}
+
#
# Ask the user if the hardware clock is set for UTC/GMT
#
@@ -146,8 +163,10 @@
if [ "`cat $TMP/utc$$`" = "YES" ]; then
# yes, the hardware clock is UTC
writeconf "UTC"
+ write_adjtime "UTC"
else # must be NO
writeconf "localtime"
+ write_adjtime "LOCAL"
fi
rm -f $TMP/utc$$
rm -f $TMP/menu-utc$$