summaryrefslogtreecommitdiffstats
path: root/PCBSD
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-05-23 02:12:06 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-05-23 02:12:06 -0400
commite4cce28bf6ee68369df0986f1b9f17630cc7c853 (patch)
treed3d1f112524ef0bf59e6e9a6cab5553a39f963b7 /PCBSD
parent99e0bc97fa32e9b867a1ea8cadbcd7956a9d653b (diff)
downloadpfsense-e4cce28bf6ee68369df0986f1b9f17630cc7c853.zip
pfsense-e4cce28bf6ee68369df0986f1b9f17630cc7c853.tar.gz
Handle cpdup mode
Diffstat (limited to 'PCBSD')
-rw-r--r--PCBSD/pc-sysinstall/backend/functions-extractimage.sh41
-rwxr-xr-xPCBSD/pc-sysinstall/backend/parseconfig.sh2
-rw-r--r--PCBSD/pc-sysinstall/examples/pfSense.cfg2
-rw-r--r--PCBSD/pc-sysinstall/examples/pfSense.cfg.zfs2
4 files changed, 27 insertions, 20 deletions
diff --git a/PCBSD/pc-sysinstall/backend/functions-extractimage.sh b/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
index e07520f..82a0f01 100644
--- a/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
+++ b/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
@@ -235,6 +235,26 @@ start_rsync_copy()
# Entrance function, which starts the installation process
init_extraction()
{
+ # Test for LiveCD Type
+ if [ "$INSTALLTYPE" = "LiveCD" ]
+ then
+ get_value_from_cfg cpdupPaths
+ if [ ! -z "${VAL}" ]
+ then
+ INSFILE="${VAL}" ; export INSFILE
+ fi
+ for FILE in $INSFILE; do
+ echo_log "pc-sysinstall: Running cpdup -vvv -I -o /${FILE} /mnt/${FILE}"
+ /usr/local/bin/cpdup -vvv -I -o /${FILE} /mnt/ >&1 2>&1
+ if [ "$?" != "0" ]
+ then
+ echo "CPDUP failure occured:" >>${LOGOUT}
+ exit_err "ERROR: Error occurred during cpdup"
+ fi
+ done
+ return
+ fi
+
# Figure out what file we are using to install from via the config
get_value_from_cfg installFile
@@ -243,22 +263,7 @@ init_extraction()
INSFILE="${VAL}" ; export INSFILE
else
# If no installFile specified, try our defaults
- if [ "$INSTALLTYPE" = "LiveCD" ]
- then
- get_value_from_cfg installComponents
- if [ ! -z "${VAL}" ]
- then
- INSFILE="${VAL}" ; export INSFILE
- for FILE in $INSFILE; do
- echo_log "pc-sysinstall: Running cpdup -vvv -I -o ${FILE} /mnt/${FILE}"
- cpdup -vvv -I -o ${FILE} /mnt/${FILE} >&1 2>&1
- if [ "$?" != "0" ]
- then
- echo "CPDUP failure occured:" >>${LOGOUT}
- exit_err "ERROR: Error occurred during cpdup"
- fi
- done
- else if [ "$INSTALLTYPE" = "FreeBSD" ]
+ if [ "$INSTALLTYPE" = "FreeBSD" ]
then
case $PACKAGETYPE in
uzip) INSFILE="${FBSD_UZIP_FILE}" ;;
@@ -281,7 +286,9 @@ init_extraction()
# Lets start by figuring out what medium we are using
case ${INSTALLMEDIUM} in
- dvd|usb) # Lets start by mounting the disk
+ LiveCD)
+ ;;
+ dvd|usb) # Lets start by mounting the disk
opt_mount
if [ ! -z "${INSDIR}" ]
then
diff --git a/PCBSD/pc-sysinstall/backend/parseconfig.sh b/PCBSD/pc-sysinstall/backend/parseconfig.sh
index 31d43bd..a86d583 100755
--- a/PCBSD/pc-sysinstall/backend/parseconfig.sh
+++ b/PCBSD/pc-sysinstall/backend/parseconfig.sh
@@ -45,7 +45,7 @@ check_value installMode "fresh upgrade"
check_value bootManager "bsd none"
check_value installType "PCBSD FreeBSD"
check_value installMedium "dvd usb ftp rsync LiveCD"
-check_value packageType "uzip tar rsync split"
+check_value packageType "uzip tar rsync split cpdup"
check_value partition "all ALL s1 s2 s3 s4 free FREE"
if_check_value_exists mirrorbal "load prefer round-robin split"
diff --git a/PCBSD/pc-sysinstall/examples/pfSense.cfg b/PCBSD/pc-sysinstall/examples/pfSense.cfg
index b827d2f..66d323a 100644
--- a/PCBSD/pc-sysinstall/examples/pfSense.cfg
+++ b/PCBSD/pc-sysinstall/examples/pfSense.cfg
@@ -25,7 +25,7 @@ installType=FreeBSD
packageType=cpdup
# Optional Components
-installComponents=boot,COPYRIGHT,bin,conf,conf.default,dev,etc,home,kernels,libexec,lib,root,sbin,sys,usr,var
+cpdupPaths=boot,COPYRIGHT,bin,conf,conf.default,dev,etc,home,kernels,libexec,lib,root,sbin,sys,usr,var
runCommand=/usr/local/bin/after_installation_routines.sh
diff --git a/PCBSD/pc-sysinstall/examples/pfSense.cfg.zfs b/PCBSD/pc-sysinstall/examples/pfSense.cfg.zfs
index 468fb45..4086e11 100644
--- a/PCBSD/pc-sysinstall/examples/pfSense.cfg.zfs
+++ b/PCBSD/pc-sysinstall/examples/pfSense.cfg.zfs
@@ -39,6 +39,6 @@ disk1-part=SWAP 0 none
commitDiskLabel
# Optional Components
-installComponents=boot,COPYRIGHT,bin,conf,conf.default,dev,etc,home,kernels,libexec,lib,root,sbin,sys,usr,var
+cpdupPaths=boot,COPYRIGHT,bin,conf,conf.default,dev,etc,home,kernels,libexec,lib,root,sbin,sys,usr,var
runCommand=/usr/local/bin/after_installation_routines.sh
OpenPOWER on IntegriCloud