1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

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
This commit is contained in:
Warner Losh 2010-08-19 06:02:31 +00:00
parent 742736b923
commit 6784d5cdbd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211487
3 changed files with 26 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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"