Ignore:
Timestamp:
08/20/13 11:28:19 (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
3d554ff
Parents:
70427a2
Message:

Update pc-sysinstall to now allow doing restores from a replicated
ZFS dataset via life-preserver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/parseconfig.sh

    rfe5d5c8 r8378d50  
    3434. ${BACKEND}/functions-cleanup.sh 
    3535. ${BACKEND}/functions-disk.sh 
     36. ${BACKEND}/functions-ftp.sh 
    3637. ${BACKEND}/functions-extractimage.sh 
    3738. ${BACKEND}/functions-installcomponents.sh 
     
    4445. ${BACKEND}/functions-parse.sh 
    4546. ${BACKEND}/functions-runcommands.sh 
    46 . ${BACKEND}/functions-ftp.sh 
    4747. ${BACKEND}/functions-unmount.sh 
    4848. ${BACKEND}/functions-upgrade.sh 
    4949. ${BACKEND}/functions-users.sh 
     50. ${BACKEND}/functions-zfsrestore.sh 
    5051 
    5152# Check that the config file exists 
     
    6465 
    6566# Start by doing a sanity check, which will catch any obvious mistakes in the config 
    66 file_sanity_check "installMode installType installMedium packageType" 
    6767 
    6868# We passed the Sanity check, lets grab some of the universal config settings and store them 
    69 check_value installMode "fresh upgrade extract" 
    70 check_value installType "PCBSD FreeBSD" 
    71 check_value installMedium "dvd usb ftp rsync image local" 
    72 check_value packageType "uzip tar rsync split dist" 
    73 if_check_value_exists mirrorbal "load prefer round-robin split" 
    74  
    75 # We passed all sanity checks! Yay, lets start the install 
    76 echo "File Sanity Check -> OK" 
     69check_value installMode "fresh upgrade extract zfsrestore" 
    7770 
    7871# Lets load the various universal settings now 
    7972get_value_from_cfg installMode 
    8073export INSTALLMODE="${VAL}" 
     74 
     75if [ "$INSTALLMODE" = "zfsrestore" ] ; then 
     76  file_sanity_check "sshHost sshPort sshUser sshKey zfsRemoteDataset" 
     77else 
     78  file_sanity_check "installMode installType installMedium packageType" 
     79  check_value installType "PCBSD FreeBSD" 
     80  check_value installMedium "dvd usb ftp rsync image local" 
     81  check_value packageType "uzip tar rsync split dist zfs" 
     82  if_check_value_exists mirrorbal "load prefer round-robin split" 
     83fi 
     84 
     85# We passed all sanity checks! Yay, lets start the install 
     86echo "File Sanity Check -> OK" 
    8187 
    8288get_value_from_cfg installType 
     
    106112# If we are not doing an upgrade, lets go ahead and setup the disk 
    107113case "${INSTALLMODE}" in 
     114  zfsrestore) restore_zfs ;; 
    108115  fresh) 
    109116    if [ "${INSTALLMEDIUM}" = "image" ] 
Note: See TracChangeset for help on using the changeset viewer.