]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/tzsetup
inst: don't hardcode /net/ether0, might have usb ethernet
[plan9front.git] / rc / bin / inst / tzsetup
1 #!/bin/rc
2
3 # desc: choose time zone
4
5 switch($1){
6 case checkdone
7         if(~ $#tzd 1 && ~ $tzd done)
8                 tzsetup=done
9         if not
10                 tzsetup=ready
11         export tzsetup
12 case go
13         echo
14         echo 'Setup Time Zone'
15         echo
16
17         options=`{ls -p /n/newfs/adm/timezone | grep -v -e '(README|local)'}
18         prompt -d US_Eastern 'Time Zone' $options
19         
20         if(test -f /n/newfs/adm/timezone/$rd){
21                 cp /n/newfs/adm/timezone/$rd /n/newfs/adm/timezone/local
22                 tzd=done
23         }
24         if not
25                 tzd=failed
26         export tzd
27 }