summaryrefslogtreecommitdiff
path: root/rc/bin/inst/tzsetup
blob: cad20dd2b1a8eedb675c56a701ff0e87511892da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/rc

# desc: choose time zone

switch($1){
case checkdone
	if(~ $#tzd 1 && ~ $tzd done)
		tzsetup=done
	if not
		tzsetup=ready
	export tzsetup
case go
	echo
	echo 'Setup Time Zone'
	echo

	options=`{ls -p /adm/timezone | grep -v -e '(README|local)'}
	prompt -d US_Eastern 'Time Zone' $options
	
	if(test -f /adm/timezone/$rd){
		cp /adm/timezone/$rd /adm/timezone/local >[2]/dev/null
		tzd=done
	}
	if not
		tzd=failed
	export tzd
}