]> git.lizzy.rs Git - plan9front.git/blob - sys/lib/dist/pc/inst/startwin
webfs on readonly filesystem
[plan9front.git] / sys / lib / dist / pc / inst / startwin
1 #!/bin/rc
2
3 fn time { date | sed 's/.........$//'}
4
5 rm -f /srv/log
6
7 if(~ $#* 2) {
8         wid=$1
9         ht=$2
10
11 if not {
12         scr=(`{cat /dev/draw/new >[2]/dev/null || status=''})
13         wid=$scr(7)
14         ht=$scr(8)
15 }
16
17 if(test $ht -gt 800)
18         ht=800
19
20 if(test $wid -gt 800)
21         wid=800
22
23 statwid=`{hoc -e $wid^'*.2'}
24 if(test $statwid -lt 180)
25         statwid=180
26 if(test $statwid -gt 300)
27         statwid=300
28
29 logwid=`{hoc -e $wid^-$statwid}
30 if(test $logwid -gt 1000)
31         logwid=1000
32
33 loght=`{hoc -e $ht^'*.25'}
34 if(test $loght -lt 130)
35         loght=130
36
37 textht=`{hoc -e $ht^-$loght}
38
39 window 0,$textht,$statwid,$ht stats -lmisce
40 window $statwid,$textht,^`{hoc -e $logwid+$statwid}^,$ht tailfsrv
41 window 0,0,^`{hoc -e $logwid+$statwid}^,$textht inst/mainloop
42
43 while(! test -f /srv/log)
44         sleep 1
45
46 log `{time} Installation process started