Deleted Added
full compact
26c26
< # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh 211487 2010-08-19 06:02:31Z imp $
---
> # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh 211730 2010-08-24 06:11:46Z imp $
57,65c57,66
< uzip) # Start by mounting the uzip image
< MDDEVICE=`mdconfig -a -t vnode -o readonly -f ${INSFILE}`
< mkdir -p ${FSMNT}.uzip
< mount -r /dev/${MDDEVICE}.uzip ${FSMNT}.uzip
< if [ "$?" != "0" ]
< then
< exit_err "ERROR: Failed mounting the ${INSFILE}"
< fi
< cd ${FSMNT}.uzip
---
> uzip)
> # Start by mounting the uzip image
> MDDEVICE=`mdconfig -a -t vnode -o readonly -f ${INSFILE}`
> mkdir -p ${FSMNT}.uzip
> mount -r /dev/${MDDEVICE}.uzip ${FSMNT}.uzip
> if [ "$?" != "0" ]
> then
> exit_err "ERROR: Failed mounting the ${INSFILE}"
> fi
> cd ${FSMNT}.uzip
67,77c68,78
< # Copy over all the files now!
< tar cvf - . 2>/dev/null | tar -xpv -C ${FSMNT} ${TAROPTS} -f - 2>&1 | tee -a ${FSMNT}/.tar-extract.log
< if [ "$?" != "0" ]
< then
< cd /
< echo "TAR failure occured:" >>${LOGOUT}
< cat ${FSMNT}/.tar-extract.log | grep "tar:" >>${LOGOUT}
< umount ${FSMNT}.uzip
< mdconfig -d -u ${MDDEVICE}
< exit_err "ERROR: Failed extracting the tar image"
< fi
---
> # Copy over all the files now!
> tar cvf - . 2>/dev/null | tar -xpv -C ${FSMNT} ${TAROPTS} -f - 2>&1 | tee -a ${FSMNT}/.tar-extract.log
> if [ "$?" != "0" ]
> then
> cd /
> echo "TAR failure occured:" >>${LOGOUT}
> cat ${FSMNT}/.tar-extract.log | grep "tar:" >>${LOGOUT}
> umount ${FSMNT}.uzip
> mdconfig -d -u ${MDDEVICE}
> exit_err "ERROR: Failed extracting the tar image"
> fi
79,89c80,91
< # All finished, now lets umount and cleanup
< cd /
< umount ${FSMNT}.uzip
< mdconfig -d -u ${MDDEVICE}
< ;;
< tar) tar -xpv -C ${FSMNT} -f ${INSFILE} ${TAROPTS} >&1 2>&1
< if [ "$?" != "0" ]
< then
< exit_err "ERROR: Failed extracting the tar image"
< fi
< ;;
---
> # All finished, now lets umount and cleanup
> cd /
> umount ${FSMNT}.uzip
> mdconfig -d -u ${MDDEVICE}
> ;;
> tar)
> tar -xpv -C ${FSMNT} -f ${INSFILE} ${TAROPTS} >&1 2>&1
> if [ "$?" != "0" ]
> then
> exit_err "ERROR: Failed extracting the tar image"
> fi
> ;;
123,126c125,128
< cd "${dir}"
< if [ -f "install.sh" ]
< then
< echo_log "Extracting" `basename ${dir}`
---
> cd "${dir}"
> if [ -f "install.sh" ]
> then
> echo_log "Extracting" `basename ${dir}`
142c144
< echo_log "Extracting" `basename ${KERNELS}`
---
> echo_log "Extracting" `basename ${KERNELS}`
148c150
< echo 'kernel="GENERIC"' > "${FSMNT}/boot/loader.conf"
---
> mv "${FSMNT}/boot/GENERIC" "${FSMNT}/boot/kernel"
158c160
< echo_log "Extracting" `basename ${SOURCE}`
---
> echo_log "Extracting" `basename ${SOURCE}`
209c211
< get_value_from_cfg ftpHost
---
> get_ftpHost
216c218
< get_value_from_cfg ftpDir
---
> get_ftpDir
230a233,244
> DIRS="base catpages dict doc games info manpages proflibs kernels src"
> if [ "${FBSD_ARCH}" = "amd64" ]
> then
> DIRS="${DIRS} lib32"
> fi
>
> for d in ${DIRS}
> do
> mkdir -p "${OUTFILE}/${d}"
> done
>
>
241,246d254
< DIRS="base catpages dict doc games info manpages proflibs kernels src"
< if [ "${FBSD_ARCH}" = "amd64" ]
< then
< DIRS="${DIRS} lib32"
< fi
<
249c257
< cat<<EOF>>"${NETRC}"
---
> cat<<EOF>>"${NETRC}"
256c264
< cat<<EOF>>"${NETRC}"
---
> cat<<EOF>>"${NETRC}"
338,341c346,349
< uzip) INSFILE="${FBSD_UZIP_FILE}" ;;
< tar) INSFILE="${FBSD_TAR_FILE}" ;;
< split)
< INSDIR="${FBSD_BRANCH_DIR}"
---
> uzip) INSFILE="${FBSD_UZIP_FILE}" ;;
> tar) INSFILE="${FBSD_TAR_FILE}" ;;
> split)
> INSDIR="${FBSD_BRANCH_DIR}"
343,345c351,353
< # This is to trick opt_mount into not failing
< INSFILE="${INSDIR}"
< ;;
---
> # This is to trick opt_mount into not failing
> INSFILE="${INSDIR}"
> ;;
349,350c357,358
< uzip) INSFILE="${UZIP_FILE}" ;;
< tar) INSFILE="${TAR_FILE}" ;;
---
> uzip) INSFILE="${UZIP_FILE}" ;;
> tar) INSFILE="${TAR_FILE}" ;;
358,363c366,372
< dvd|usb) # Lets start by mounting the disk
< opt_mount
< if [ ! -z "${INSDIR}" ]
< then
< INSDIR="${CDMNT}/${INSDIR}" ; export INSDIR
< start_extract_split
---
> dvd|usb)
> # Lets start by mounting the disk
> opt_mount
> if [ ! -z "${INSDIR}" ]
> then
> INSDIR="${CDMNT}/${INSDIR}" ; export INSDIR
> start_extract_split
365,373c374,378
< else
< INSFILE="${CDMNT}/${INSFILE}" ; export INSFILE
< start_extract_uzip_tar
< fi
< ;;
< ftp)
< if [ "$PACKAGETYPE" = "split" ]
< then
< fetch_split_files
---
> else
> INSFILE="${CDMNT}/${INSFILE}" ; export INSFILE
> start_extract_uzip_tar
> fi
> ;;
375,384c380,396
< INSDIR="${INSFILE}" ; export INSDIR
< start_extract_split
< else
< fetch_install_file
< start_extract_uzip_tar
< fi
< ;;
< rsync) start_rsync_copy
< ;;
< *) exit_err "ERROR: Unknown install medium" ;;
---
> ftp|sftp)
> if [ "$PACKAGETYPE" = "split" ]
> then
> fetch_split_files
>
> INSDIR="${INSFILE}" ; export INSDIR
> start_extract_split
> else
> fetch_install_file
> start_extract_uzip_tar
> fi
> ;;
>
> rsync) start_rsync_copy ;;
> img)
> ;;
> *) exit_err "ERROR: Unknown install medium" ;;