From 2b69de496b4eb48e80c0756cfd32abffdc169ccc Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 14 Aug 2010 22:35:51 -0400 Subject: [PATCH] Allow swap spaces and default to 200M --- usr/local/www/installer.php | 16 ++++++++++++---- usr/sbin/pc-sysinstall/examples/pfSense.cfg | 3 ++- usr/sbin/pc-sysinstall/examples/pfSense.cfg.zfs | 4 +++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/usr/local/www/installer.php b/usr/local/www/installer.php index 6249b38dff..87f9e60dae 100644 --- a/usr/local/www/installer.php +++ b/usr/local/www/installer.php @@ -56,11 +56,17 @@ switch ($_REQUEST['state']) { installer_main(); } -function write_out_pc_sysinstaller_config($disk, $fstype = "UFS+S") { +function write_out_pc_sysinstaller_config($disk, $fstype = "UFS+S", $swapsize = false) { $fd = fopen("/usr/sbin/pc-sysinstall/examples/pfSense-install.cfg", "w"); if(!$fd) { return true; } + if($swapsize) { + $diskareas = "disk0-part=SWAP $swap none \n"; + $diskareas .= "disk1-part={$fstype} 0 / \n"; + } else { + $diskareas = "disk1-part={$fstype} 0 / \n"; + } $config = <<

EOF; + $custom_txt .= "\n"; $custom_txt .= ""; + $zfs_enabled = ""; page_table_start(); echo << @@ -708,7 +716,7 @@ EOF;
Swap size
Disk:
Easy installation of {$g['product_name']} using the ZFS filesystem on disk {$disk}
Easy installation of {$g['product_name']} using the ZFS filesystem on disk {$disk}
{$zfs_enabled}
- Easy installation of {$g['product_name']} using the UFS filesystem on disk {$disk} + Easy installation of {$g['product_name']} using the UFS filesystem on disk {$disk}
diff --git a/usr/sbin/pc-sysinstall/examples/pfSense.cfg b/usr/sbin/pc-sysinstall/examples/pfSense.cfg index 9cb6d6baac..d042954597 100644 --- a/usr/sbin/pc-sysinstall/examples/pfSense.cfg +++ b/usr/sbin/pc-sysinstall/examples/pfSense.cfg @@ -15,7 +15,8 @@ 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 -disk0-part=UFS+S 0 / +disk0-part=SWAP 500 none +disk1-part=UFS+S 0 / # Do it now! commitDiskLabel diff --git a/usr/sbin/pc-sysinstall/examples/pfSense.cfg.zfs b/usr/sbin/pc-sysinstall/examples/pfSense.cfg.zfs index 5976cb5ddb..c89520693a 100644 --- a/usr/sbin/pc-sysinstall/examples/pfSense.cfg.zfs +++ b/usr/sbin/pc-sysinstall/examples/pfSense.cfg.zfs @@ -22,7 +22,9 @@ commitDiskPart # All sizes are expressed in MB # Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP # UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli -disk0-part=ZFS 0 / (mirror: da2) +disk0-part=SWAP 500 none +disk1-part=ZFS+S 0 / + commitDiskLabel # Disk Setup for da2