Executable to run on boot that removes old tzdata if needed

tzdatacheck is exec'd from init.rc early in boot just after /data is
mounted. It checks to make sure that the tz rule data in /data
is newer than the version in /system. If the data is older it is
deleted. This is to address problems with earlier tz rule updates
that occurred: after an OTA upgrade previous updates in /data
would override newer versions in the system partition.

Includes change to init.rc neccessary to run it at boot time. Other
changes are in external/selinux.

Bug: 19941636
Bug: https://code.google.com/p/android/issues/detail?id=35730
Change-Id: I7cc61e058424c856da88f11ff9b259f34cb39dc7
diff --git a/rootdir/init.rc b/rootdir/init.rc
index e6f4f4a..a2b8f59 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -321,6 +321,9 @@
     # Set SELinux security contexts on upgrade or policy update.
     restorecon_recursive /data
 
+    # Check any timezone data in /data is newer than the copy in /system, delete if not.
+    exec u:r:tzdatacheck:s0 system system -- /system/bin/tzdatacheck /system/usr/share/zoneinfo /data/misc/zoneinfo
+
     # If there is no fs-post-data action in the init.<device>.rc file, you
     # must uncomment this line, otherwise encrypted filesystems
     # won't work.