Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/install-added-venti/download

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

# prereq: mountfs
# desc: download or continue to download the distribution archives

switch($1) {
case checkready
	devs=(`{cat /net/ipifc/*/status >[2]/dev/null |
		grep -v '127\.0\.0\.1' |
		sed 's/ .*//'})
	if(~ $#devs 0) {
		download=notdone
		export download
	}
	if(~ $mountdist done){
		download=notdone
		export download
	}

case go
	if(! test -f /srv/cs) {
		log starting cs, dns
		logprog ndb/cs >>/srv/log >[2=1]
		logprog ndb/dns -r >>/srv/log >[2=1]
	}
	if(! test -f /net/cs) {
		logprog mount -a /srv/cs /net
		logprog mount -a /srv/dns /net
	}

	# BUG make restartable
	echo 'Downloading distribution package...'
	if(! hget -vo /n/fossil/dist/_plan9.iso.bz2 $installurl/plan9.iso.bz2 |[2] bargraph -w 145,129,445,168 'downloading '^plan9.iso.bz2)
		exit
	mv /n/fossil/dist/_plan9.iso.bz2 /n/fossil/dist/plan9.iso.bz2
	if(~ $fstype fossil){
		echo fsys main sync >>/srv/fscons
	}

	echo 'The distribution is downloaded.'

	srvmedia=()
	mountmedia=(mount /srv/fossil /n/distmedia)
	distmediadir=/dist
	export distmediadir mountmedia distmedia
	
case checkdone
	if(! test -f /n/fossil/dist/plan9.iso.bz2) {
		download=notdone
		export download
	}
}


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].