All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* pfSense_BUILDER_BINARIES: /sbin/mount /sbin/glabel /usr/bin/grep /usr/bin/cut /usr/bin/head /bin/cp pfSense_BUILDER_BINARIES: /usr/sbin/boot0cfg /bin/mkdir /sbin/fsck_ufs /sbin/mount /sbin/sysctl /bin/dd /sbin/tunefs pfSense_MODULE: nanobsd */ ##|+PRIV ##|*IDENT=page-diagnostics-nanobsd ##|*NAME=Diagnostics: NanoBSD ##|*DESCR=Allow access to the 'Diagnostics: NanoBSD' page. ##|*MATCH=diag_nanobsd.php* ##|-PRIV ini_set('zlib.output_compression', 0); ini_set('implicit_flush', 1); ini_set('max_input_time', '9999'); require_once("guiconfig.inc"); require_once("config.inc"); $pgtitle = array(gettext("Diagnostics"), gettext("NanoBSD")); include("head.inc"); // Survey slice info global $SLICE, $OLDSLICE, $TOFLASH, $COMPLETE_PATH, $COMPLETE_BOOT_PATH; global $GLABEL_SLICE, $UFS_ID, $OLD_UFS_ID, $BOOTFLASH; global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE, $ACTIVE_SLICE; nanobsd_detect_slice_info(); ?> "> $statusmsg

  EOF; nanobsd_switch_boot_slice(); $savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice(); // Survey slice info nanobsd_detect_slice_info(); } if($_POST['destslice']) { $statusmsg = gettext("Duplicating slice. Please wait, this will take a moment..."); echo << $statusmsg

  EOF; if(nanobsd_clone_slice($_POST['destslice'])) { $savemsg = gettext("The slice has been duplicated.") . "

" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area."); } else { $savemsg = gettext("There was an error while duplicating the slice. Operation aborted."); } // Re-Survey slice info nanobsd_detect_slice_info(); } if (isset($_POST['rrdbackup'])) { $config['system']['rrdbackup'] = $_POST['rrdbackup']; install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}"); } if (isset($_POST['dhcpbackup'])) { $config['system']['dhcpbackup'] = $_POST['dhcpbackup']; install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}"); } if ($savemsg) print_info_box($savemsg) ?>
 
 




 

 
 






 
 
"; echo file_get_contents("/conf/upgrade_log.txt"); echo "\nFile list:\n"; echo file_get_contents("/conf/file_upgrade_log.txt"); echo "\nMisc log:\n"; echo file_get_contents("/conf/firmware_update_misc_log.txt"); echo "\nfdisk/bsdlabel log:\n"; echo file_get_contents("/conf/fdisk_upgrade_log.txt"); echo ""; } else { echo "
"; echo ""; } ?>
 

"; echo "jQuery('#loading').html('');"; echo ""; ?>