Modify

Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#7772 closed defect (fixed)

timezone is not set when using eglibc

Reported by: umiki at med.unideb.hu Owned by: developers
Priority: low Milestone: Barrier Breaker 14.07
Component: toolchain Version: Trunk
Keywords: eglibc timezone Cc:

Description

Eglibc (and possibly glibc?) does not use /etc/TZ to set timezone, but /etc/localtime pointing to the correct location in the /usr/share/zoneinfo database. Modifying /etc/init.d/boot like below, could solve this problem, although I am not sure how to properly detect uclibc (or eglibc for that matter). Unfortunately a proper zoneinfo database is rather large, I have attached a subset of it, which represents Europe.

--- /rom/etc/init.d/boot
+++ /etc/init.d/boot
@@ -16,8 +16,16 @@
        config_get buffersize "$cfg" buffersize
        [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}

-       config_get timezone "$cfg" timezone 'UTC'
-       echo "$timezone" > /tmp/TZ
+       if  /bin/ls /lib | /bin/grep -q libuClibc ; then
+           config_get timezone "$cfg" timezone 'UTC'
+           echo "$timezone" > /tmp/TZ
+       else
+           config_get zonename "$cfg" zonename 'Europe/Berlin'
+           if ! [[ -f /etc/timezone && $zonename = $(/bin/cat /etc/timezone) ]] ; then
+               echo $zonename > /etc/timezone
+               /bin/ln -sf /usr/share/zoneinfo/$zonename /etc/localtime
+           fi
+       fi

        if [ -x /sbin/syslogd ]; then
                local log_ip log_size log_port log_type log_file

Attachments (2)

boot.patch (771 bytes) - added by umiki at med.unideb.hu 7 years ago.
TimezoneEurope (19.7 KB) - added by umiki at med.unideb.hu 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by umiki at med.unideb.hu

Changed 7 years ago by umiki at med.unideb.hu

comment:1 Changed 7 years ago by anonymous

TimezoneEurope is gzipped tar (--> TimezoneEurope.tgz)

comment:2 Changed 6 years ago by swalker

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r28306.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.