From 6141561c822c66ec5ad53c4fc440bab8d6d88f91 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 17 Dec 2010 10:52:55 -0500 Subject: [PATCH] Add newline after 99 menu option. Otherwise it looks very strange. --- etc/rc.initial | 6 ++++- usr/local/www/installer.php | 47 ++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/etc/rc.initial b/etc/rc.initial index 4d88bda730..84c666cbe9 100755 --- a/etc/rc.initial +++ b/etc/rc.initial @@ -73,7 +73,11 @@ echo " 4) Reset to factory defaults 12) ${product} Developer Shell" echo " 5) Reboot system 13) Upgrade from console" echo " 6) Halt system ${sshd_option}" echo " 7) Ping host ${option98}" -/bin/echo "${option99}" + +if [ "${option99}" != "" ]; then + /bin/echo "${option99}" + echo +fi read -p "Enter an option: " opmode echo diff --git a/usr/local/www/installer.php b/usr/local/www/installer.php index 68570aca4b..607f0e6f99 100644 --- a/usr/local/www/installer.php +++ b/usr/local/www/installer.php @@ -58,7 +58,7 @@ switch ($_REQUEST['state']) { installer_main(); } -function write_out_pc_sysinstaller_config($disk, $fstype = "UFS+S", $swapsize = false) { +function write_out_pc_sysinstaller_config($disk, $fstype = "UFS+S", $swapsize = false, $encryption = false, $encpass = "") { $fd = fopen("/usr/sbin/pc-sysinstall/examples/pfSense-install.cfg", "w"); if(!$fd) { return true; @@ -87,6 +87,12 @@ commitDiskPart # All sizes are expressed in MB # Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP # Size 0 means use the rest of the slice size +# Alternatively, you can append .eli to any of +# the above filesystem types to encrypt that disk. +# If you with to use a passphrase with this +# encrypted partition, on the next line +# the flag "encpass=" should be entered: +# encpass=mypass {$diskareas} # Do it now! @@ -307,7 +313,17 @@ function begin_install() { $fstype = htmlspecialchars(strtoupper($_REQUEST['fstype'])); else $fstype = "UFS+S"; - write_out_pc_sysinstaller_config($disk, $fstype); + if(substr($_REQUEST['fstype'], -4, 4) == ".eli") { + $encryption = true; + if($_REQUEST['encpass']) + $encpass = $_REQUEST['encpass']; + else + $encpass = ""; + } else { + $encryption = false; + $encpass = ""; + } + write_out_pc_sysinstaller_config($disk, $fstype, $encryption, $encpass); update_installer_status_win(sprintf(gettext("Beginning installation on disk %s."),$disk)); start_installation(); } @@ -642,16 +658,26 @@ EOF; $custom_txt .= "\n"; // XXX: Convert to rowhelper. Add Ajax callbacks to verify sizes, etc. // Prepare disk types - $custom_txt .= "Filesystem type:\n"; $custom_txt .= "\n"; $custom_txt .= "\n"; + $custom_txt .= "\n"; + $custom_txt .= "\n"; $release = php_uname("r"); $release = $release[0]; - if($release == "9") + if($release == "9") { $custom_txt .= "\n"; - if(file_exists("/boot/gptzfsboot")) + $custom_txt .= "\n"; + } + if(file_exists("/boot/gptzfsboot")) { $custom_txt .= "\n"; - $custom_txt .= "\n

"; + $custom_txt .= "\n"; + } + $custom_txt .= "\n"; + $custom_txt .= ""; + $custom_txt .= "Disk encryption password:"; + $custom_txt .= ""; + $custom_txt .= "

"; } echo << @@ -664,6 +690,15 @@ EOF;