xref: /plan9/sys/lib/dist/pc/inst/copydist (revision 3169ffa1eac219c32b108b39e973849da022a203)
1#!/bin/rc
2
3# prereq: mountdist
4# desc: copy the distribution into the file system
5
6switch($1){
7case checkready
8	if(! test -d /n/dist/dist/replica){
9		copydist=notdone
10		export copydist
11		exit
12	}
13	if(test -f /n/newfs/dist/replica/didplan9){
14		copydist=done
15		export copydist
16		exit
17	}
18case go
19	inst/watchfd applylog 0 `{ls -l /n/dist/dist/replica/plan9.log | awk '{print $6}'} 'Installing file system' &
20	replica/pull -c / /rc/bin/inst/replcfg
21	if(~ $status '' *conflicts || test -f /n/newfs/dist/replica/didplan9witherrors)
22		>/n/newfs/dist/replica/didplan9
23	if not
24		>/n/newfs/dist/replica/didplan9witherrors
25
26case checkdone
27	if(! test -f /n/newfs/dist/replica/didplan9){
28		copydist=notdone
29		export copydist
30	}
31}
32