summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pc-sysinstall
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-08-19 06:02:31 +0000
committerimp <imp@FreeBSD.org>2010-08-19 06:02:31 +0000
commite2d4a5a85f565d5d5a6b1e0ccd682f0d79e0d8a2 (patch)
treeb3fc9a63f79b12e75989eece42d8f1146f1dde1f /usr.sbin/pc-sysinstall
parentbc2b00ae354e3bf5e5d2bd85ca560e795b337a4f (diff)
downloadFreeBSD-src-e2d4a5a85f565d5d5a6b1e0ccd682f0d79e0d8a2.zip
FreeBSD-src-e2d4a5a85f565d5d5a6b1e0ccd682f0d79e0d8a2.tar.gz
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
Diffstat (limited to 'usr.sbin/pc-sysinstall')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-extractimage.sh10
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-packages.sh16
-rwxr-xr-xusr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh7
3 files changed, 26 insertions, 7 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh b/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
index de86711..54a742b 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
@@ -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
diff --git a/usr.sbin/pc-sysinstall/backend/functions-packages.sh b/usr.sbin/pc-sysinstall/backend/functions-packages.sh
index 1ec24be..161a511 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-packages.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-packages.sh
@@ -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
diff --git a/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh b/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh
index 85bb6af..3c48c48 100755
--- a/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh
+++ b/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh
@@ -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"
OpenPOWER on IntegriCloud