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. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the NAS4Free Project. */ require "auth.inc"; require "guiconfig.inc"; $pgtitle = array(gettext("Disks"), gettext("Format")); // Get list of all supported file systems. $a_fst = get_fstype_list(); unset($a_fst['ntfs']); // Remove NTFS: can't format on NTFS under NAS4Free unset($a_fst['geli']); // Remove geli unset($a_fst['cd9660']); // Remove cd9660: can't format a CD/DVD ! $a_fst = array_slice($a_fst, 1); // Remove the first blank line 'unknown' unset($a_fst['ufs']); // Remove old UFS type: Now NAS4Free will impose only one UFS type: GPT/EFI with softupdate unset($a_fst['ufs_no_su']); unset($a_fst['ufsgpt_no_su']); // Load the /etc/cfdevice file to find out on which disk the OS is installed. $cfdevice = trim(file_get_contents("{$g['etc_path']}/cfdevice")); $cfdevice = "/dev/{$cfdevice}";
html_combobox("apm", gettext("Advanced Power Management"), $pconfig['apm'], $options, gettext("This allows you to lower the power consumption of the drive, at the expense of performance."), false); ?> <?php $options = array(0 => gettext("Disabled"), 1 => gettext("Minimum performance, Minimum acoustic output"), 64 => gettext("Medium acoustic output"), 127 => gettext("Maximum performance, maximum acoustic output")); ?> <?php html_combobox("acoustic", gettext("Acoustic level"), $pconfig['acoustic'], $options, gettext("This allows you to set how loud the drive is while it's operating."), false); ?> <?php html_checkbox("smart_enable", gettext("S.M.A.R.T."), !empty($pconfig['smart_enable']) ? true : false, gettext("Activate S.M.A.R.T. monitoring for this device."), "", false, "smart_enable_change()"); ?> <?php html_inputbox("smart_extraoptions", gettext("S.M.A.R.T. extra options"), $pconfig['smart_extraoptions'], gettext("Extra options (usually empty).") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://smartmontools.sourceforge.net/man/smartd.conf.5.html"), false, 40); ?> <?php $options = get_fstype_list(); ?> <?php html_combobox("fstype", gettext("Preformatted file system"), $pconfig['fstype'], $options, gettext("This allows you to set the file system for preformatted hard disks containing data.") . " " . sprintf(gettext("Leave '%s' for unformated disks and format them using <a href='%s'>format</a> menu."), "Unformated", "disks_init.php"), false); ?> </table> <div id="submit"> <input name="Submit" type="submit" class="formbtn" value="<?php echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add"); ?> " onclick="enable_change(true)" /> <input name="Cancel" type="submit" class="formbtn" value="<?php echo gettext("Cancel"); ?> " /> <input name="uuid" type="hidden" value="<?php
</select> <br /> <?php echo gettext("This allows you to set how loud the drive is while it\\'s operating.<em>Do not set this for CF cards.</em>"); ?> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?php echo gettext("preformated FS"); ?> </td> <td width="78%" class="vtable"> <select name="fstype" class="formselect"> <?php $fstlist = get_fstype_list(); ?> <?php foreach ($fstlist as $fstval => $fstname) { ?> <option value="<?php echo $fstval; ?> " <?php if ($pconfig['fstype'] == $fstval) { echo 'selected'; } ?> ><?php echo htmlspecialchars($fstname); ?>