git: 9front

Download patch

ref: 1935cc8822c4defddb45b520bb0f76b4995dff76
parent: 69f0d8b299c2d5a61a0f866eed1bf49b9eb08b22
author: stanley lieber <stanley.lieber@gmail.com>
date: Sun Aug 28 11:12:58 EDT 2011

install: add tzsetup

--- a/rc/bin/inst/main
+++ b/rc/bin/inst/main
@@ -22,6 +22,7 @@
 	download\
 	copydist\
 	ndbsetup nvramsetup\
+	tzsetup\
 	bootsetup finish stop\
 	stopether stopppp\
 )
--- /dev/null
+++ b/rc/bin/inst/tzsetup
@@ -1,0 +1,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
+}
--