Date: Wed, 21 Jul 2010 04:05:49 GMT From: John Hixson <john@ixsystems.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/148806: pc-sysinstall misc cleanup Message-ID: <201007210405.o6L45n1l001219@www.freebsd.org> Resent-Message-ID: <201007210410.o6L4A1J1050068@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 148806
>Category: misc
>Synopsis: pc-sysinstall misc cleanup
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Jul 21 04:10:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: John Hixson
>Release: 9.0-CURRENT
>Organization:
iXsystems, Inc
>Environment:
FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Jul 13 09:31:39 PDT 2010 john@thinkbsd:/usr/src/sys/amd64/compile/THINKBSD amd64
>Description:
Some cleanup, changed some echo's to echo_log, check for PROGDIR so that different PROGDIR's can be set.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -urN usr.sbin/pc-sysinstall.ftpinstall/backend/functions-extractimage.sh usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
--- usr.sbin/pc-sysinstall.ftpinstall/backend/functions-extractimage.sh 2010-07-15 18:40:46.000000000 -0700
+++ usr.sbin/pc-sysinstall/backend/functions-extractimage.sh 2010-07-19 16:59:43.000000000 -0700
@@ -123,7 +123,7 @@
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 @@
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 @@
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 @@
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
diff -urN usr.sbin/pc-sysinstall.ftpinstall/backend/functions-packages.sh usr.sbin/pc-sysinstall/backend/functions-packages.sh
--- usr.sbin/pc-sysinstall.ftpinstall/backend/functions-packages.sh 2010-07-15 18:39:27.000000000 -0700
+++ usr.sbin/pc-sysinstall/backend/functions-packages.sh 2010-07-15 20:11:52.000000000 -0700
@@ -63,6 +63,22 @@
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
diff -urN usr.sbin/pc-sysinstall.ftpinstall/pc-sysinstall/pc-sysinstall.sh usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh
--- usr.sbin/pc-sysinstall.ftpinstall/pc-sysinstall/pc-sysinstall.sh 2010-07-14 16:01:57.000000000 -0700
+++ usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh 2010-07-19 16:16:12.000000000 -0700
@@ -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"
>Release-Note:
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007210405.o6L45n1l001219>
