inst: fix download task using ip/httpfile to mount a iso over http and prompt for installurl
This commit is contained in:
parent
41372f346a
commit
2559f92a83
2 changed files with 14 additions and 17 deletions
|
@ -18,27 +18,23 @@ case checkready
|
|||
}
|
||||
|
||||
case go
|
||||
# BUG make restartable
|
||||
echo 'Downloading distribution package...'
|
||||
baropt='-w 145,129,445,168'
|
||||
if(~ $textinst 1)
|
||||
baropt=-t
|
||||
mkdir -p /n/newfs/dist
|
||||
if(! hget -vo /n/newfs/dist/_9front.iso.bz2 $installurl/9front.iso.bz2 |[2] aux/statusbar $baropt 'downloading '^9front.iso.bz2)
|
||||
exit
|
||||
mv /n/newfs/dist/_9front.iso.bz2 /n/newfs/dist/9front.iso.bz2
|
||||
default=()
|
||||
if(~ $#installurl 1)
|
||||
default=(-d $installurl)
|
||||
prompt $default 'Installation url'
|
||||
installurl=$rd
|
||||
|
||||
echo 'The distribution is downloaded.'
|
||||
if(! test -e /mnt/web/ctl)
|
||||
webfs
|
||||
|
||||
srvmedia=()
|
||||
mountmedia=(mount /srv/cwfs /n/distmedia)
|
||||
distmediadir=/dist
|
||||
export distmediadir mountmedia distmedia
|
||||
srvmedia=(ip/httpfile -s httpdist $installurl/9front.iso)
|
||||
mountmedia=(mount /srv/httpdist /n/distmedia)
|
||||
distmediadir=/
|
||||
export srvmedia mountmedia distmediadir
|
||||
|
||||
case checkdone
|
||||
if(! test -f /n/newfs/dist/9front.iso.bz2) {
|
||||
if(! test -f /n/distmedia/9front.iso) {
|
||||
download=notdone
|
||||
export download
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ fn havedist {
|
|||
fn trycdimage{
|
||||
if(test -f $1){
|
||||
rm -f /srv/9660.dist
|
||||
unmount /n/dist
|
||||
unmount /n/dist >[2]/dev/null
|
||||
9660srv 9660.dist >[2]/dev/null
|
||||
logprog mount /srv/9660.dist /n/dist $1
|
||||
exitifdone
|
||||
|
@ -34,6 +34,7 @@ fn trycdimage{
|
|||
|
||||
fn trycdimagebz2 {
|
||||
if(test -f $1){
|
||||
mkdir -p /n/newfs/dist
|
||||
echo -n 'bunzip2 < '^$1^' >/n/newfs/dist/9front.iso'
|
||||
bunzip2 < $1 >/n/newfs/dist/_9front.iso &&
|
||||
mv /n/newfs/dist/_9front.iso /n/newfs/dist/9front.iso
|
||||
|
|
Loading…
Reference in a new issue