[PC-BSD Commits] r21387 - pcbsd/current/src-sh/pc-thinclient
svn at pcbsd.org
svn at pcbsd.org
Thu Feb 7 10:24:13 PST 2013
Author: kris
Date: 2013-02-07 18:24:13 +0000 (Thu, 07 Feb 2013)
New Revision: 21387
Modified:
pcbsd/current/src-sh/pc-thinclient/pc-thinclient
Log:
Also fix pc-thinclient to use new distfiles locations
Modified: pcbsd/current/src-sh/pc-thinclient/pc-thinclient
===================================================================
--- pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2013-02-07 18:16:37 UTC (rev 21386)
+++ pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2013-02-07 18:24:13 UTC (rev 21387)
@@ -37,7 +37,7 @@
PXEWORLD="/usr/home/thinclient"
WORLDPORTS="x11/xorg graphics/xv"
export WORLDPORTS
-SYSVER="$(pbreg get /PC-BSD/Version)"
+SYSVER="`uname -r`"
# Start by sourcing /etc/profile
# This grabs any HTTP_ / FTP_ PROXY variables
@@ -255,30 +255,35 @@
ARCH="`uname -m`"
fi
- # To fetch the jail environment
- echo "Fetching FreeBSD environment... This may take a while..."
- get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz" "rel.txz" 3
- if [ $? -ne 0 ] ; then
- exit_err "Error downloading release files..."
+ local dFiles="base.txz doc.txz kernel.txz games.txz"
+ if [ "$ARCH" = "amd64" ] ; then
+ dFiles="$dFiles lib32.txz"
fi
- get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz.md5" "rel.md5" 3
- if [ $? -ne 0 ] ; then
- exit_err "Error downloading release files..."
- fi
- if [ `md5 -q rel.txz` != `cat rel.md5` ] ; then
- exit_err "Error in download data, checksum mismatch.. Please try again later."
- fi
- echo "Extracting PC-BSD environment... This may take a while..."
- tar xvpf rel.txz 2>/dev/null
- if [ $? -ne 0 ] ; then
- exit_err "Failed extracting PC-BSD environment"
- fi
+ # To fetch the jail environment
+ echo "Fetching FreeBSD environment. This may take a while..."
+ for i in $dFiles
+ do
+ echo "Downloading ${MIRRORURL}/${SYSVER}/${ARCH}/dist/${i} ..."
+
+ get_file "${MIRRORURL}/${SYSVER}/${ARCH}/dist/${i}" "$i" 3
+ [ $? -ne 0 ] && exit_err "Error while downloading the freebsd world."
+ done
# Save the archive as our example world environment
mkdir -p ${PXEWORLD}/installarchive/
- mv rel.txz ${PXEWORLD}/installarchive/fbsd-release.txz
- mv rel.md5 ${PXEWORLD}/installarchive/fbsd-release.txz.md5
+
+ echo "Extracting FreeBSD environment... This may take a while..."
+ # Extract dist files
+ for i in $dFiles
+ do
+ tar xvpf ${i} 2>/dev/null
+ if [ $? -ne 0 ] ; then exit_err "Failed extracting FreeBSD environment"; fi
+
+ # Save the archive file
+ mv ${i} ${PXEWORLD}/installarchive/
+ done
+
}
# Function to check if dhcpd is installed
More information about the Commits
mailing list