[go: up one dir, main page]

File: foo

package info (click to toggle)
timezoneconf 0.5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 144 kB
  • ctags: 26
  • sloc: python: 222; perl: 112; makefile: 39
file content (18 lines) | stat: -rw-r--r-- 651 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- postinst	Fri Oct 27 15:51:19 2000
+++ /tmp/timezoneconf-0.1/debian/postinst	Tue Jan  9 13:27:17 2001
@@ -5,6 +5,15 @@
 my $toplevel = get("timezoneconf/toplevel");
 my $zone = get("timezoneconf/zone");
 
+# If /etc/localtime exists and is a link, dereference it no matter what.
+
+if (-l "/etc/localtime") {
+  # print STDERR "Detected link, dereferencing.\n";
+  system("/bin/cp --dereference /etc/localtime /etc/localtime.save");
+  system("/bin/rm -f /etc/localtime");
+  system("/bin/mv /etc/localtime.save /etc/localtime");
+}
+
 # Bail if they haven't been answered yet!
 
 unless ((fget("timezoneconf/toplevel", "isdefault") eq "false") &&