<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3785&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / dpkg-reconfigure -f noninteractive tzdata not working in Beowulf?]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3785</link>
		<description><![CDATA[The most recent posts in dpkg-reconfigure -f noninteractive tzdata not working in Beowulf?.]]></description>
		<lastBuildDate>Sat, 29 Aug 2020 11:03:39 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: dpkg-reconfigure -f noninteractive tzdata not working in Beowulf?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24375#p24375</link>
			<description><![CDATA[<p>Yea, that&#039;s what I ended up doing in out stuff. Odd though...I have no idea what dpkg-reconfigure with the noninteractive frontend is doing as compared to what it used to do. It seems to be basing it on the existing /etc/localtime link instead of the timezone in /etc/timezone.</p><p>Tom</p>]]></description>
			<author><![CDATA[dummy@example.com (tlathm)]]></author>
			<pubDate>Sat, 29 Aug 2020 11:03:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24375#p24375</guid>
		</item>
		<item>
			<title><![CDATA[Re: dpkg-reconfigure -f noninteractive tzdata not working in Beowulf?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24371#p24371</link>
			<description><![CDATA[<div class="quotebox"><cite>tlathm wrote:</cite><blockquote><div><p>For the time being I may just work around it by doing an &quot;ln -snf &lt;zonefile&gt; /etc/localtime.</p></div></blockquote></div><p>That&#039;s exactly what the postinst script does:</p><div class="codebox"><pre class="vscroll"><code>if [ &quot;$1&quot; = configure ]; then
    # If the user prefers to manage the time zone by itself, let him doing that.

    if ! [ -e /etc/timezone ] &amp;&amp; [ -z &quot;$DEBCONF_RECONFIGURE&quot; ] ; then
        db_stop
        echo
        echo &quot;User defined time zone, leaving /etc/localtime unchanged.&quot;
    else
    
        # Get the values from debconf
        AREA=Etc
        ZONE=UTC
        db_get tzdata/Areas &amp;&amp; AREA=&quot;$RET&quot;
        db_get tzdata/Zones/$AREA &amp;&amp; ZONE=&quot;$RET&quot;
        db_stop
    
        # Update the time zone
        echo $AREA/$ZONE &gt; /etc/timezone
        ln -nsf /usr/share/zoneinfo/$AREA/$ZONE /etc/localtime.dpkg-new &amp;&amp; \
            mv -f /etc/localtime.dpkg-new /etc/localtime
        which restorecon &gt;/dev/null 2&gt;&amp;1 &amp;&amp; restorecon /etc/localtime
    
        echo 
        echo &quot;Current default time zone: &#039;$AREA/$ZONE&#039;&quot;
    fi

    # Show the new setting to the user
    TZBase=$(LC_ALL=C TZ=UTC0 date)
    UTdate=$(LC_ALL=C TZ=UTC0 date -d &quot;$TZBase&quot;)
    TZdate=$(unset TZ ; LANG=C date -d &quot;$TZBase&quot;)
    echo &quot;Local time is now:      $TZdate.&quot;
    echo &quot;Universal Time is now:  $UTdate.&quot;
    if [ -z &quot;$DEBCONF_RECONFIGURE&quot; ] ; then
        echo &quot;Run &#039;dpkg-reconfigure tzdata&#039; if you wish to change it.&quot;
    fi
    echo
fi</code></pre></div><p>EDIT: added the rest of the configure option.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 29 Aug 2020 10:30:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24371#p24371</guid>
		</item>
		<item>
			<title><![CDATA[dpkg-reconfigure -f noninteractive tzdata not working in Beowulf?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24354#p24354</link>
			<description><![CDATA[<p>Wow...did this one have me going nuts. Writing the timezone to /etc/timezone and then using dpkg-reconfigure seems wildly broken in Beowulf. This definitely worked in Jessie:</p><div class="codebox"><pre><code># date
Thu 27 Aug 2020 04:44:20 PM EDT
# cat /etc/timezone 
America/New_York
# ll /etc/localtime 
lrwxrwxrwx 1 root root 36 Aug 27 16:43 /etc/localtime -&gt; /usr/share/zoneinfo/America/New_York
# echo America/Chicago &gt; /etc/timezone 
# dpkg-reconfigure -f noninteractive tzdata

Current default time zone: &#039;America/New_York&#039;
Local time is now:      Thu Aug 27 16:44:53 EDT 2020.
Universal Time is now:  Thu Aug 27 20:44:53 UTC 2020.

# date
Thu 27 Aug 2020 04:44:56 PM EDT
# cat /etc/timezone 
America/New_York</code></pre></div><p>So it&#039;s rewriting /etc/timezone to the old timezone and apparently using that? Anyone else run into this? Again, under Jessie this would have configured it to central time correctly.</p><p>On thing that may be related: In Beowulf /etc/localtime is a symbolic link to the actual file in /usr/share/zoneinfo and under Jessie it was a physical copy of the file. I always thought that links for that were not advised, because in cases where /usr is not part of / it might not be available during boot(???).</p><p>We do this in a setup wizard for our product and started getting burned really bad by this. For the time being I may just work around it by doing an &quot;ln -snf &lt;zonefile&gt; /etc/localtime.</p><p>Thanks in advance.</p><p>Tom</p>]]></description>
			<author><![CDATA[dummy@example.com (tlathm)]]></author>
			<pubDate>Thu, 27 Aug 2020 21:06:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24354#p24354</guid>
		</item>
	</channel>
</rss>
