diff options
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend/parseconfig.sh')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend/parseconfig.sh | 91 |
1 files changed, 15 insertions, 76 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/parseconfig.sh b/usr.sbin/pc-sysinstall/backend/parseconfig.sh index ff5694c..af4f974 100755 --- a/usr.sbin/pc-sysinstall/backend/parseconfig.sh +++ b/usr.sbin/pc-sysinstall/backend/parseconfig.sh @@ -73,9 +73,9 @@ file_sanity_check "installMode disk0 installType installMedium packageType" check_value installMode "fresh upgrade" check_value bootManager "bsd none" check_value installType "PCBSD FreeBSD" -check_value installMedium "dvd usb ftp rsync img" +check_value installMedium "dvd usb ftp rsync" check_value packageType "uzip tar rsync split" -if_check_value_exists partition "all ALL s1 s2 s3 s4 free FREE" +if_check_value_exists partition "all s1 s2 s3 s4 free image" if_check_value_exists mirrorbal "load prefer round-robin split" # We passed all sanity checks! Yay, lets start the install @@ -98,79 +98,18 @@ PACKAGETYPE="${VAL}" ; export PACKAGETYPE start_networking # If we are not doing an upgrade, lets go ahead and setup the disk -if [ "${INSTALLMODE}" = "fresh" ] -then +case "${INSTALLMODE}" in + fresh) + install_fresh + ;; - # Lets start setting up the disk slices now - setup_disk_slice - - # Disk setup complete, now lets parse WORKINGSLICES and setup the bsdlabels - setup_disk_label - - # Now we've setup the bsdlabels, lets go ahead and run newfs / zfs - # to setup the filesystems - setup_filesystems - - # Lets mount the partitions now - mount_all_filesystems - - # We are ready to begin extraction, lets start now - init_extraction - - # Check if we have any optional modules to load - install_components - - # Check if we have any packages to install - install_packages - - # Do any localization in configuration - run_localize - - # Save any networking config on the installed system - save_networking_install - - # Now add any users - setup_users - - # Now run any commands specified - run_commands - - # Do any last cleanup / setup before unmounting - run_final_cleanup - - # Unmount and finish up - unmount_all_filesystems - - echo_log "Installation finished!" - exit 0 - -else - # We're going to do an upgrade, skip all the disk setup - # and start by mounting the target drive/slices - mount_upgrade - - # Start the extraction process - init_extraction - - # Do any localization in configuration - run_localize - - # Now run any commands specified - run_commands - - # Merge any old configuration files - merge_old_configs - - # Check if we have any optional modules to load - install_components - - # Check if we have any packages to install - install_packages - - # All finished, unmount the file-systems - unmount_upgrade - - echo_log "Upgrade finished!" - exit 0 -fi + upgrade) + install_upgrade + ;; + + *) + exit 1 + ;; +esac +exit 0 |