plan9fox/rc/bin/inst/tzsetup

28 lines
457 B
Text
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
2011-08-30 17:00:00 +00:00
options=`{ls -p /n/newfs/adm/timezone | grep -v -e '(README|local)'}
2011-08-28 20:12:58 +00:00
prompt -d US_Eastern 'Time Zone' $options
2011-08-30 17:00:00 +00:00
if(test -f /n/newfs/adm/timezone/$rd){
cp /n/newfs/adm/timezone/$rd /n/newfs/adm/timezone/local
2011-08-28 20:12:58 +00:00
tzd=done
}
if not
tzd=failed
export tzd
}