Menu

[r3118]: / trunk / www / system_advanced.php  Maximize  Restore  History

Download this file

169 lines (155 with data), 7.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/usr/local/bin/php
<?php
/*
system_advanced.php
part of FreeNAS (http://www.freenas.org)
Copyright (C) 2005-2008 Olivier Cochard-Labbé <olivier@freenas.org>.
All rights reserved.
Based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
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.
*/
require("guiconfig.inc");
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Advanced"));
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
$pconfig['expanddiags'] = isset($config['system']['webgui']['expanddiags']);
$pconfig['disablebeep'] = isset($config['system']['disablebeep']);
$pconfig['tune_enable'] = isset($config['system']['tune']);
$pconfig['zeroconf'] = isset($config['system']['zeroconf']);
$pconfig['powerd'] = isset($config['system']['powerd']);
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
/* input validation */
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
$input_errors[] = gettext("The TCP idle timeout must be an integer.");
}
if (!$input_errors) {
$config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false;
$config['system']['disablefirmwarecheck'] = $_POST['disablefirmwarecheck'] ? true : false;
$config['system']['webgui']['expanddiags'] = $_POST['expanddiags'] ? true : false;
$config['system']['webgui']['noantilockout'] = $_POST['noantilockout'] ? true : false;
$config['system']['disablebeep'] = $_POST['disablebeep'] ? true : false;
$config['system']['tune'] = $_POST['tune_enable'] ? true : false;
$config['system']['zeroconf'] = $_POST['zeroconf'] ? true : false;
$config['system']['powerd'] = $_POST['powerd'] ? true : false;
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval |= rc_update_service("powerd");
$retval |= rc_update_service("systune");
$retval |= rc_update_service("mdnsresponder");
config_unlock();
}
$savemsg = get_std_save_message($retval);
}
}
?>
<?php include("fbegin.inc");?>
<?php if ($input_errors) print_input_errors($input_errors);?>
<?php if ($savemsg) print_info_box($savemsg);?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabnavtbl">
<ul id="tabnav">
<li class="tabact"><a href="system_advanced.php" title="<?=gettext("Reload page");?>"><?=gettext("Advanced");?></a></li>
<li class="tabinact"><a href="system_email.php"><?=gettext("Email");?></a></li>
<li class="tabinact"><a href="system_proxy.php"><?=gettext("Proxy");?></a></li>
<li class="tabinact"><a href="system_swap.php"><?=gettext("Swap");?></a></li>
<li class="tabinact"><a href="system_rc.php"><?=gettext("Command scripts");?></a></li>
<li class="tabinact"><a href="system_cron.php"><?=gettext("Cron");?></a></li>
</ul>
</td>
</tr>
<tr>
<td class="tabcont">
<form action="system_advanced.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Miscellaneous");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Console menu");?></td>
<td width="78%" class="vtable">
<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked";?>>
<?=gettext("Disable console menu");?></br>
<span class="vexpl"><?=gettext("Changes to this option will take effect after a reboot.");?></span>
</td>
</tr>
<?php if ("full" !== $g['platform']):?>
<tr>
<td valign="top" class="vncell"><?=gettext("Firmware version check");?></td>
<td class="vtable">
<input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked";?>>
<?=gettext("Disable firmware version check");?></br>
<span class="vexpl"><?php echo sprintf(gettext("This will cause %s not to check for newer firmware versions when the <a href=%s>%s</a> page is viewed."), get_product_name(), "system_firmware.php", gettext("System").": ".gettext("Firmware"));?></span>
</td>
</tr>
<?php endif;?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Navigation");?></td>
<td width="78%" class="vtable">
<input name="expanddiags" type="checkbox" id="expanddiags" value="yes" <?php if ($pconfig['expanddiags']) echo "checked";?>>
<?=gettext("Keep diagnostics in navigation expanded");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("System Beep");?></td>
<td width="78%" class="vtable">
<input name="disablebeep" type="checkbox" id="disablebeep" value="yes" <?php if ($pconfig['disablebeep']) echo "checked";?>>
<?=gettext("Disable speaker beep on startup and shutdown");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Tuning");?></td>
<td width="78%" class="vtable">
<input name="tune_enable" type="checkbox" id="tune_enable" value="yes" <?php if ($pconfig['tune_enable']) echo "checked";?>>
<?=gettext("Enable tuning of some kernel variables");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Power Daemon");?></td>
<td width="78%" class="vtable">
<input name="powerd" type="checkbox" id="powerd" value="yes" <?php if ($pconfig['powerd']) echo "checked"; ?>>
<?=gettext("Enable the system power control utility");?></br>
<span class="vexpl"><?=gettext("The powerd utility monitors the system state and sets various power control options accordingly.");?></span>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Zeroconf");?></td>
<td width="78%" class="vtable">
<input name="zeroconf" type="checkbox" id="zeroconf" value="yes" <?php if ($pconfig['zeroconf']) echo "checked";?>>
<?=gettext("Enable Zeroconf");?>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?php include("fend.inc");?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.