File: 05tzsetup

package info (click to toggle)
tzsetup 1%3A0.134
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,660 kB
  • sloc: perl: 79; sh: 53; makefile: 15
file content (15 lines) | stat: -rwxr-xr-x 309 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -e

. /usr/share/debconf/confmodule

db_get time/zone
zone="$RET"

if [ -z "$zone" ] || [ ! -e /target/usr/share/zoneinfo/$zone ]; then
	logger -t tzsetup "Warning: ignoring invalid time zone '$zone'"
	exit 0
fi

rm -f /target/etc/localtime
ln -s /usr/share/zoneinfo/$zone /target/etc/localtime