plan9fox/rc/bin/inst/tzsetup

28 lines
439 B
Plaintext
Raw Normal View History

2011-08-28 20:12:58 +00:00
#!/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
}