[PC-BSD Commits] r13315 - pcbsd/current/src-sh/pc-thinclient
svn at pcbsd.org
svn at pcbsd.org
Tue Oct 11 09:48:08 PDT 2011
Author: kris
Date: 2011-10-11 09:48:08 -0700 (Tue, 11 Oct 2011)
New Revision: 13315
Modified:
pcbsd/current/src-sh/pc-thinclient/pc-thinclient
Log:
Improve pc-thinclient to just fetch freebsd tarball from mirror instead of
doing buildworld
Modified: pcbsd/current/src-sh/pc-thinclient/pc-thinclient
===================================================================
--- pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2011-10-11 16:08:04 UTC (rev 13314)
+++ pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2011-10-11 16:48:08 UTC (rev 13315)
@@ -215,24 +215,38 @@
# Check if we need to build the world environment
check_world() {
- if [ -e "${PXEWORLD}/COPYRIGHT" ] ; then return ; fi
+ if [ -e "${PXEWORLD}/COPYRIGHT" ] ; then return ; fi
- if [ ! -e "/usr/src/COPYRIGHT" ] ; then
- echo "Error: You will need a copy of FreeBSD sources in /usr/src to build the portjail."
- echo "You may checkout sources via the System Manager, CVS, SVN or other method."
- exit 1
- fi
+ mkdir -p "${PXEWORLD}"
+ cd "${PXEWORLD}"
- # Building world environment
- echo "Starting buildworld, this may take a while..."
- sleep 5
- mkdir -p "${PXEWORLD}"
- cd /usr/src
- make buildworld buildkernel installworld installkernel distribution DESTDIR=${PXEWORLD} TARGET=i386
- if [ "$?" != "0" ] ; then
- exit_err "The buildworld failed! Please check your sources and try again."
- fi
+ # Default pcbsd.conf file
+ PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
+ # Set the mirror URL
+ MIRRORURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_MIRROR: ' | sed 's|PCBSD_MIRROR
+:||g'`"
+
+ # Set the system arch type
+ ARCH="i386"
+
+ # To fetch the jail environment
+ echo "Fetching FreeBSD environment... This may take a while..."
+ fetch -o rel.tbz ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.tbz
+ fetch -o rel.md5 ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.tbz.md
+5
+
+ if [ `md5 -q rel.tbz` != `cat rel.md5` ] ; then
+ echo "Error in download data, checksum mismatch.. Please try again later."
+ exit 1
+ fi
+
+ echo "Extracting FreeBSD environment... This may take a while..."
+ tar xvpf rel.tbz 2>/dev/null
+
+ # Cleanup
+ rm rel.tbz
+ rm rel.md5
}
# Function to check if dhcpd is installed
More information about the Commits
mailing list