Author: imp Date: Thu Aug 19 06:02:31 2010 New Revision: 211487 URL: http://svn.freebsd.org/changeset/base/211487
Log: Some cleanup, changed some echo's to echo_log, check for PROGDIR so that different PROGDIR's can be set. PR: 148806 Submitted by: John Hixson Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh head/usr.sbin/pc-sysinstall/backend/functions-packages.sh head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Aug 19 06:01:25 2010 (r211486) +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Aug 19 06:02:31 2010 (r211487) @@ -123,7 +123,7 @@ start_extract_split() cd "${dir}" if [ -f "install.sh" ] then - echo "Extracting" `basename ${dir}` + echo_log "Extracting" `basename ${dir}` echo "y" | sh install.sh >/dev/null if [ "$?" != "0" ] then @@ -139,7 +139,7 @@ start_extract_split() cd "${KERNELS}" if [ -f "install.sh" ] then - echo "Extracting" `basename ${KERNELS}` + echo_log "Extracting" `basename ${KERNELS}` echo "y" | sh install.sh generic >/dev/null if [ "$?" != "0" ] then @@ -155,7 +155,7 @@ start_extract_split() cd "${SOURCE}" if [ -f "install.sh" ] then - echo "Extracting" `basename ${SOURCE}` + echo_log "Extracting" `basename ${SOURCE}` echo "y" | sh install.sh all >/dev/null if [ "$?" != "0" ] then @@ -259,8 +259,8 @@ bye EOF - # Fetch the files via ftp - echo "$ INSTALL" | ftp -N "${NETRC}" "${FTPHOST}" + # Fetch the files via ftp + echo "$ INSTALL" | ftp -N "${NETRC}" "${FTPHOST}" # Done fetching, now reset the INSFILE to our downloaded archived INSFILE="${OUTFILE}" ; export INSFILE Modified: head/usr.sbin/pc-sysinstall/backend/functions-packages.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Thu Aug 19 06:01:25 2010 (r211486) +++ head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Thu Aug 19 06:02:31 2010 (r211487) @@ -63,6 +63,22 @@ get_package_index_by_fs() fetch_file "${INDEX_FILE}" "${CONFDIR}/" "0" }; +get_package_index_size() +{ + if [ -f "${CONFDIR}/INDEX" ] + then + SIZE=`ls -l ${CONFDIR}/INDEX | awk '{ print $5 }'` + else + get_ftp_mirror + FTPHOST="${VAL}" + + FTPDIR="/pub/FreeBSD/releases/${FBSD_ARCH}/${FBSD_BRANCH}" + FTPPATH="ftp://${FTPHOST}${FTPDIR}/packages" + + fetch -s "${FTPPATH}/INDEX.bz2" + fi +}; + get_package_index() { RES=0 Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:01:25 2010 (r211486) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:02:31 2010 (r211487) @@ -36,8 +36,11 @@ # User-editable configuration variables # Set this to the program location -PROGDIR="/usr/share/pc-sysinstall" -export PROGDIR +if [ -z "${PROGDIR}" ] +then + PROGDIR="/usr/share/pc-sysinstall" + export PROGDIR +fi # Set this to the components location COMPDIR="${PROGDIR}/components" _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"