[PC-BSD Commits] r4846 - in pcbsd/trunk/pc-sysinstall: . backend
svn at pcbsd.org
svn at pcbsd.org
Mon Nov 2 14:11:38 PST 2009
Author: kris
Date: 2009-11-02 14:11:38 -0800 (Mon, 02 Nov 2009)
New Revision: 4846
Modified:
pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh
pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh
pcbsd/trunk/pc-sysinstall/pcinstall.cfg
Log:
Started adding support for restoring in pc-sysinstall, needs more testing / updates to
be working
Modified: pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh 2009-11-02 21:35:17 UTC (rev 4845)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh 2009-11-02 22:11:38 UTC (rev 4846)
@@ -54,34 +54,43 @@
# Entrance function, which starts the installation process
init_extraction()
{
- # Lets figure out what file we are working on here and set it
- if [ "$INSTALLTYPE" = "FreeBSD" ]
- then
- case $PACKAGETYPE in
- lzma) INSFILE="${FBSD_LZMA_FILE}" ;;
- uzip) INSFILE="${FBSD_UZIP_FILE}" ;;
- tar) INSFILE="${FBSD_TAR_FILE}" ;;
- esac
- else
- case $PACKAGETYPE in
- lzma) INSFILE="${LZMA_FILE}" ;;
- uzip) INSFILE="${UZIP_FILE}" ;;
- tar) INSFILE="${TAR_FILE}" ;;
- esac
- fi
- export INSFILE
+ if [ "${INSTALLMODE}" = "restore" -o "${INSTALLMODE}" = "upgrade" ]
+ then
+ # Figure out what file we are using to install from via the config
+ get_value_from_cfg installFile
+ INSFILE="${VAL}" ; export INSFILE
+ else
- # Lets start by figuring out what medium we are using
- case ${INSTALLMEDIUM} in
- dvd) # Lets start by mounting the disk
- opt_mount
- start_extract_dvd
- ;;
- usb) usb_mount
- start_extract_usb ;;
- ftp) start_extract_ftp ;;
- *) exit_err "ERROR: Unknown install medium" ;;
- esac
+ # Lets figure out what file we are working on here and set it
+ if [ "$INSTALLTYPE" = "FreeBSD" ]
+ then
+ case $PACKAGETYPE in
+ lzma) INSFILE="${FBSD_LZMA_FILE}" ;;
+ uzip) INSFILE="${FBSD_UZIP_FILE}" ;;
+ tar) INSFILE="${FBSD_TAR_FILE}" ;;
+ esac
+ else
+ case $PACKAGETYPE in
+ lzma) INSFILE="${LZMA_FILE}" ;;
+ uzip) INSFILE="${UZIP_FILE}" ;;
+ tar) INSFILE="${TAR_FILE}" ;;
+ esac
+ fi
+ export INSFILE
+ fi
+
+ # Lets start by figuring out what medium we are using
+ case ${INSTALLMEDIUM} in
+ dvd) # Lets start by mounting the disk
+ opt_mount
+ start_extract_dvd
+ ;;
+ usb) usb_mount
+ start_extract_usb ;;
+ ftp) start_extract_ftp ;;
+ *) exit_err "ERROR: Unknown install medium" ;;
+ esac
+
};
Modified: pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh 2009-11-02 21:35:17 UTC (rev 4845)
+++ pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh 2009-11-02 22:11:38 UTC (rev 4846)
@@ -64,7 +64,7 @@
PACKAGETYPE="${VAL}" ; export PACKAGETYPE
# If we are not doing an upgrade, lets go ahead and setup the disk
-if [ "${INSTALLMODE}" != "upgrade" ]
+if [ "${INSTALLMODE}" = "fresh" -o "${INSTALLMODE}" = "restore" ]
then
# Lets start setting up the disk slices now
setup_disk_slice
@@ -84,15 +84,21 @@
# Check if we have any optional modules to load
install_components
+
+ if [ "${INSTALLMODE}" != "restore" ]
+ then
+ # Now add any users
+ setup_users
+ fi
- # Now add any users
- setup_users
-
# Now run any commands specified
run_commands
- # Do any localization in configuration
- run_localize
+ if [ "${INSTALLMODE}" != "restore" ]
+ then
+ # Do any localization in configuration
+ run_localize
+ fi
# Do any last cleanup / setup before unmounting
run_final_cleanup
Modified: pcbsd/trunk/pc-sysinstall/pcinstall.cfg
===================================================================
--- pcbsd/trunk/pc-sysinstall/pcinstall.cfg 2009-11-02 21:35:17 UTC (rev 4845)
+++ pcbsd/trunk/pc-sysinstall/pcinstall.cfg 2009-11-02 22:11:38 UTC (rev 4846)
@@ -28,6 +28,7 @@
#packageType=lzma
#packageType=uzip
packageType=tar
+installFile=freebsd-release.tbz
#installComponents=ports,src
commitInstall
More information about the Commits
mailing list