1#!/bin/sh 2#- 3# Copyright (c) 2010 iXsystems, Inc. All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24# SUCH DAMAGE. 25# |
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/parseconfig.sh 212337 2010-09-08 20:10:24Z imp $ |
27 28# Main install configuration parsing script 29# 30 31# Source our functions scripts 32. ${BACKEND}/functions.sh 33. ${BACKEND}/functions-bsdlabel.sh 34. ${BACKEND}/functions-cleanup.sh --- 33 unchanged lines hidden (view full) --- 68 69# Start by doing a sanity check, which will catch any obvious mistakes in the config 70file_sanity_check "installMode disk0 installType installMedium packageType" 71 72# We passed the Sanity check, lets grab some of the universal config settings and store them 73check_value installMode "fresh upgrade" 74check_value bootManager "bsd none" 75check_value installType "PCBSD FreeBSD" |
76check_value installMedium "dvd usb ftp rsync" |
77check_value packageType "uzip tar rsync split" |
78if_check_value_exists partition "all s1 s2 s3 s4 free image" |
79if_check_value_exists mirrorbal "load prefer round-robin split" 80 81# We passed all sanity checks! Yay, lets start the install 82echo "File Sanity Check -> OK" 83 84# Lets load the various universal settings now 85get_value_from_cfg installMode 86INSTALLMODE="${VAL}" ; export INSTALLMODE --- 6 unchanged lines hidden (view full) --- 93 94get_value_from_cfg packageType 95PACKAGETYPE="${VAL}" ; export PACKAGETYPE 96 97# Check if we are doing any networking setup 98start_networking 99 100# If we are not doing an upgrade, lets go ahead and setup the disk |
101case "${INSTALLMODE}" in 102 fresh) 103 install_fresh 104 ;; |
105 |
106 upgrade) 107 install_upgrade 108 ;; |
109 |
110 *) 111 exit 1 112 ;; 113esac |
114 |
115exit 0 |