Skip to content
This repository
Browse code

Added support to store both i386 and amd64 install??.iso in different…

… folders. Added another mirror that is faster
  • Loading branch information...
commit 04bd0be1a677f4d09089fed6efb296f59e3e1df1 1 parent 2e7103f
Johan Ryberg jryberg authored

Showing 1 changed file with 11 additions and 3 deletions. Show diff stats Hide diff stats

  1. +11 3 build-usbinstallimage.sh
14 build-usbinstallimage.sh
@@ -11,6 +11,10 @@ ARC=i386
11 11 # Change if ftp.eu.openbsd.org is not the best place to get your files from
12 12 URLBASE="http://ftp.eu.openbsd.org/pub/OpenBSD/${LONGREL}"
13 13
  14 +# Another mirror
  15 +#URLBASE="http://ftp.netbsd.se/OpenBSD/${LONGREL}"
  16 +
  17 +
14 18 # No need to change anything below this line for new OS releases!
15 19 SUDO=sudo
16 20 DEVICE=vnd0
@@ -20,6 +24,7 @@ MOUNTPOINT=/mnt/image
20 24 MOUNTPOINTCD=/mnt/cd
21 25 TEMPFILE=/tmp/build-diskimage.tmp.$$
22 26 KERNELFILE=${KERNELFILE:-${MOUNTPOINTCD}/${LONGREL}/${ARC}/bsd.rd}
  27 +DISTSTUFF=diststuff
23 28
24 29 # drive geometry information
25 30
@@ -39,11 +44,14 @@ fi
39 44
40 45 IMAGEFILE=$1
41 46
  47 +# Make directory for dist stuff
  48 +mkdir -p ${DISTSTUFF}/${ARC}
  49 +
42 50 echo ""
43 51 echo "Downloading install${SHORTREL}.iso..."
44   -if [ ! -f ${SOURCECD} ] ; then
  52 +if [ ! -f ${DISTSTUFF}/${ARC}/${SOURCECD} ] ; then
45 53 echo "Needed ${SOURCECD}, didn't find it in current dir so downloading.."
46   - ftp ${URLBASE}/${ARC}/${SOURCECD}
  54 + ftp -o ${DISTSTUFF}/${ARC}/${SOURCECD} ${URLBASE}/${ARC}/${SOURCECD}
47 55 else
48 56 echo "${SOURCECD} already exist, don't need to download it again"
49 57 fi
@@ -119,7 +127,7 @@ fi
119 127
120 128 echo ""
121 129 echo "Mounting the install iso as a device..."
122   -${SUDO} vnconfig $DEVICECD $SOURCECD
  130 +${SUDO} vnconfig $DEVICECD ${DISTSTUFF}/${ARC}/${SOURCECD}
123 131
124 132 echo ""
125 133 echo "Mouting install cd to ${MOUNTPOINTCD}..."

0 comments on commit 04bd0be

Please sign in to comment.
Something went wrong with that request. Please try again.