Copyright (C) 2013-2015 Electric Sheep Fencing, LP 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 /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 ($_POST['changero']) { if (is_writable("/")) { conf_mount_ro(); } else { conf_mount_rw(); } } if ($_POST['setrw']) { conf_mount_rw(); if (isset($_POST['nanobsd_force_rw'])) $config['system']['nanobsd_force_rw'] = true; else unset($config['system']['nanobsd_force_rw']); write_config("Changed Permanent Read/Write Setting"); conf_mount_ro(); } if ($savemsg) print_info_box($savemsg) ?>
 
 




 
Current Read/Write Status:
"; } else { echo gettext("Read-Only"); if (!isset($config['system']['nanobsd_force_rw'])) echo "
"; } ?>

Permanent Read/Write:
>
 


 
Advanced, Miscellaneous tab")?>.
 
"; echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/upgrade_log.txt")); echo "\nFile list:\n"; echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/file_upgrade_log.txt")); echo "\nMisc log:\n"; echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/firmware_update_misc_log.txt")); echo "\nfdisk/bsdlabel log:\n"; echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/fdisk_upgrade_log.txt")); echo ""; } else { echo "
"; echo ""; } ?>
 

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