No backward zone name entries in zone.tab

Herton Ronaldo Krzesinski herton at mandriva.com.br
Fri May 2 18:25:44 UTC 2008


Hi,

Currently it seems timezone in general has a problem related to backward zone 
names and entries in zone.tab. Every time the name of a zone changes, its 
entry is replaced in zone.tab file and added to backward file as a Link, 
until now no problem, but after you install timezone how you can get the 
zone.tab entry when using the old zone name? Is there a way to do this, or 
shouldn't both the new and old zone name stay in zone.tab?

For now I made this set of commands to add back zone names to zone.tab based 
on backward file:

chmod +w zone.tab
echo -e "\n# zone info for backward zone names" >> zone.tab
cat backward | grep Link | while read link curr old; do
	if [ -z "$curr" -o -z "$old" ]; then
		echo "Error processing backward entry for zone.tab"
		exit 1
	fi
	cat zone.tab | grep -v '^#' | grep "$curr" | \
	while read l; do
		if [ "`echo \"$l\" | awk 'BEGIN { FS = \"[\t]\" } \
		     { print $3 }'`" = "$curr" ]; then
			echo "$l" | sed "s|$curr|$old|" >> zone.tab \
				|| echo ERROR >> zone.tab
		else
			echo ERROR >> zone.tab
		fi
	done
done
if grep -q "^ERROR" zone.tab; then
	echo "Error adding backward entries to zone.tab"
	exit 1
fi

Without old zone names in zone.tab, problems like this can happen when 
applications still use old zone names:
https://qa.mandriva.com/show_bug.cgi?id=40184

Other solution would be to just install backward file in the system to allow 
applications to know the zone that changed names and use the new name.

--
[]'s
Herton



More information about the tz mailing list