$NANOBSD_SIZE = nanobsd_get_size(); $class = 'alert-warning'; if ($_POST['bootslice']) { if (!DEBUG) { nanobsd_switch_boot_slice(); } else { sleep(4); } $savemsg = sprintf(gettext("The boot slice has been set to %s"), nanobsd_get_active_slice()); $class = 'alert-success'; // Survey slice info nanobsd_detect_slice_info(); } if ($_POST['destslice'] && $_POST['duplicateslice']) { $statusmsg = gettext("Duplicating slice. Please wait, this will take a moment..."); if (!DEBUG && nanobsd_clone_slice($_POST['destslice'])) { $savemsg = gettext("The slice has been duplicated.") . "<p/>" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area."); $class = 'alert-success'; } else { $savemsg = gettext("There was an error while duplicating the slice.\t Operation aborted."); $class = 'alert-danger'; } // Re-Survey slice info nanobsd_detect_slice_info(); } if ($_POST['changero']) { if (!DEBUG && is_writable("/")) { conf_mount_ro(); } else { conf_mount_rw(); }
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 <<<EOF \t<div id="loading"> \t\t<img src="/themes/{$g['theme']}/images/misc/loader.gif"> \t\t{$statusmsg} \t\t<p/> \t</div> EOF; if (nanobsd_clone_slice($_POST['destslice'])) { $savemsg = gettext("The slice has been duplicated.") . "<p/>" . 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']) {