Projet

Général

Profil

Télécharger (31 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / system_advanced_misc.php @ a99547e4

1
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_misc.php
5
	part of pfSense
6
	Copyright (C) 2005-2007 Scott Ullrich
7

    
8
	Copyright (C) 2008 Shrew Soft Inc
9

    
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13

    
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16

    
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19

    
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23

    
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35
/*
36
	pfSense_MODULE:	system
37
*/
38

    
39
##|+PRIV
40
##|*IDENT=page-system-advanced-misc
41
##|*NAME=System: Advanced: Miscellaneous page
42
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
43
##|*MATCH=system_advanced_misc.php*
44
##|-PRIV
45

    
46
require("guiconfig.inc");
47
require_once("functions.inc");
48
require_once("filter.inc");
49
require_once("shaper.inc");
50
require_once("vpn.inc");
51
require_once("vslb.inc");
52

    
53
$pconfig['proxyurl'] = $config['system']['proxyurl'];
54
$pconfig['proxyport'] = $config['system']['proxyport'];
55
$pconfig['proxyuser'] = $config['system']['proxyuser'];
56
$pconfig['proxypass'] = $config['system']['proxypass'];
57
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
58
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
59
$pconfig['srctrack'] = $config['system']['srctrack'];
60
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
61
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
62
$pconfig['crypto_hardware'] = $config['system']['crypto_hardware'];
63
$pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
64
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
65
$pconfig['kill_states'] = isset($config['system']['kill_states']);
66
$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']);
67
$pconfig['apinger_debug'] = isset($config['system']['apinger_debug']);
68
$pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']);
69
$pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size'];
70
$pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size'];
71
$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
72

    
73
$pconfig['powerd_ac_mode'] = "hadp";
74
if (!empty($config['system']['powerd_ac_mode']))
75
	$pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode'];
76

    
77
$pconfig['powerd_battery_mode'] = "hadp";
78
if (!empty($config['system']['powerd_battery_mode']))
79
	$pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode'];
80

    
81
$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
82
			'aesni' => gettext("AES-NI CPU-based Acceleration"));
83

    
84
$thermal_hardware_modules = array(	'coretemp' => gettext("Intel Core* CPU on-die thermal sensor"),
85
					'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor"));
86

    
87
if ($_POST) {
88

    
89
	unset($input_errors);
90
	$pconfig = $_POST;
91

    
92
	ob_flush();
93
	flush();
94

    
95
	if (!empty($_POST['crypto_hardware']) && !array_key_exists($_POST['crypto_hardware'], $crypto_modules))
96
		$input_errors[] = gettext("Please select a valid Cryptographic Accelerator.");
97

    
98
	if (!empty($_POST['thermal_hardware']) && !array_key_exists($_POST['thermal_hardware'], $thermal_hardware_modules))
99
		$input_errors[] = gettext("Please select a valid Thermal Hardware Sensor.");
100

    
101
	if (!empty($_POST['use_mfs_tmp_size']) && (!is_numeric($_POST['use_mfs_tmp_size']) || ($_POST['use_mfs_tmp_size'] <= 40)))
102
		$input_errors[] = gettext("/tmp Size must be numeric and should not be less than 40MB.");
103

    
104
	if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] <= 60)))
105
		$input_errors[] = gettext("/var Size must be numeric and should not be less than 60MB.");
106

    
107
	if (!$input_errors) {
108

    
109
		if($_POST['harddiskstandby'] <> "") {
110
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
111
			system_set_harddisk_standby();
112
		} else
113
			unset($config['system']['harddiskstandby']);
114

    
115
		if($_POST['proxyurl'] <> "")
116
			$config['system']['proxyurl'] = $_POST['proxyurl'];
117
		else
118
			unset($config['system']['proxyurl']);
119

    
120
		if($_POST['proxyport'] <> "")
121
			$config['system']['proxyport'] = $_POST['proxyport'];
122
		else
123
			unset($config['system']['proxyport']);
124

    
125
		if($_POST['proxyuser'] <> "")
126
			$config['system']['proxyuser'] = $_POST['proxyuser'];
127
		else
128
			unset($config['system']['proxyuser']);
129

    
130
		if($_POST['proxypass'] <> "")
131
			$config['system']['proxypass'] = $_POST['proxypass'];
132
		else
133
			unset($config['system']['proxypass']);
134

    
135
		$need_relayd_restart = false;
136
		if($_POST['lb_use_sticky'] == "yes") {
137
			if (!isset($config['system']['lb_use_sticky'])) {
138
				$config['system']['lb_use_sticky'] = true;
139
				$config['system']['srctrack'] = $_POST['srctrack'];
140
				$need_relayd_restart = true;
141
			}
142
		} else {
143
			if (isset($config['system']['lb_use_sticky'])) {
144
				unset($config['system']['lb_use_sticky']);
145
				$need_relayd_restart = true;
146
			}
147
		}
148

    
149
		if($_POST['gw_switch_default'] == "yes")
150
			$config['system']['gw_switch_default'] = true;
151
		else
152
			unset($config['system']['gw_switch_default']);
153

    
154
		if($_POST['pkg_nochecksig'] == "yes")
155
			$config['system']['pkg_nochecksig'] = true;
156
		elseif (isset($config['system']['pkg_nochecksig']))
157
			unset($config['system']['pkg_nochecksig']);
158

    
159
		if($_POST['powerd_enable'] == "yes")
160
			$config['system']['powerd_enable'] = true;
161
		else
162
			unset($config['system']['powerd_enable']);
163

    
164
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
165
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
166

    
167
		if($_POST['crypto_hardware'])
168
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
169
		else
170
			unset($config['system']['crypto_hardware']);
171

    
172
		if($_POST['thermal_hardware'])
173
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
174
		else
175
			unset($config['system']['thermal_hardware']);
176

    
177
		if($_POST['schedule_states'] == "yes")
178
			$config['system']['schedule_states'] = true;
179
		else
180
			unset($config['system']['schedule_states']);
181

    
182
		if($_POST['kill_states'] == "yes")
183
			$config['system']['kill_states'] = true;
184
		else
185
			unset($config['system']['kill_states']);
186

    
187
		if($_POST['skip_rules_gw_down'] == "yes")
188
			$config['system']['skip_rules_gw_down'] = true;
189
		else
190
			unset($config['system']['skip_rules_gw_down']);
191

    
192
		$need_apinger_restart = false;
193
		if($_POST['apinger_debug'] == "yes") {
194
			if (!isset($config['system']['apinger_debug']))
195
				$need_apinger_restart = true;
196
			$config['system']['apinger_debug'] = true;
197
		} else {
198
			if (isset($config['system']['apinger_debug']))
199
				$need_apinger_restart = true;
200
			unset($config['system']['apinger_debug']);
201
		}
202

    
203
		if($_POST['use_mfs_tmpvar'] == "yes")
204
			$config['system']['use_mfs_tmpvar'] = true;
205
		else
206
			unset($config['system']['use_mfs_tmpvar']);
207

    
208
		$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
209
		$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
210

    
211
		if (isset($_POST['rrdbackup'])) {
212
			$config['system']['rrdbackup'] = $_POST['rrdbackup'];
213
			install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
214
		}
215
		if (isset($_POST['dhcpbackup'])) {
216
			$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
217
			install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
218
		}
219

    
220
		write_config();
221

    
222
		$retval = 0;
223
		system_resolvconf_generate(true);
224
		$retval = filter_configure();
225
		if(stristr($retval, "error") <> true)
226
			$savemsg = get_std_save_message(gettext($retval));
227
		else
228
			$savemsg = gettext($retval);
229

    
230
		activate_powerd();
231
		load_crypto();
232
		load_thermal_hardware();
233
		if ($need_relayd_restart)
234
			relayd_configure();
235
		if ($need_apinger_restart)
236
			setup_gateways_monitor();
237
	}
238
}
239

    
240
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
241
include("head.inc");
242

    
243
?>
244

    
245
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
246
<?php
247
	include("fbegin.inc");
248
	if ($input_errors)
249
		print_input_errors($input_errors);
250
	if ($savemsg)
251
		print_info_box($savemsg);
252
?>
253
<script type="text/javascript">
254
//<![CDATA[
255
function sticky_checked(obj) {
256
	if (obj.checked)
257
		jQuery('#srctrack').attr('disabled',false);
258
	else
259
		jQuery('#srctrack').attr('disabled','true');
260
}
261
function tmpvar_checked(obj) {
262
	if (obj.checked) {
263
		jQuery('#use_mfs_tmp_size').attr('disabled',false);
264
		jQuery('#use_mfs_var_size').attr('disabled',false);
265
		jQuery('#rrdbackup').attr('disabled',false);
266
		jQuery('#dhcpbackup').attr('disabled',false);
267
	} else {
268
		jQuery('#use_mfs_tmp_size').attr('disabled','true');
269
		jQuery('#use_mfs_var_size').attr('disabled','true');
270
		jQuery('#rrdbackup').attr('disabled','true');
271
		jQuery('#dhcpbackup').attr('disabled','true');
272
	}
273
}
274
//]]>
275
</script>
276
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
277
		<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="system advanced misc">
278
			<tr>
279
				<td>
280
					<?php
281
						$tab_array = array();
282
						$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
283
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
284
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
285
						$tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
286
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
287
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
288
						display_top_tabs($tab_array);
289
					?>
290
				</td>
291
			</tr>
292
			<tr>
293
				<td id="mainarea">
294
					<div class="tabcont">
295
						<span class="vexpl">
296
							<span class="red">
297
								<strong><?=gettext("NOTE:"); ?>&nbsp;</strong>
298
							</span>
299
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
300
							<br />
301
						</span>
302
						<br />
303
						<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
304
							<tr>
305
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Proxy support"); ?></td>
306
							</tr>
307
							<tr>
308
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy URL"); ?></td>
309
								<td width="78%" class="vtable">
310
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo $pconfig['proxyurl']; ?>" class="formfld unknown" />
311
									<br />
312
									<?php printf(gettext("Proxy url for allowing %s to use this proxy to connect outside."),$g['product']); ?>
313
								</td>
314
							</tr>
315
							<tr>
316
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
317
								<td width="78%" class="vtable">
318
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo $pconfig['proxyport']; ?>" class="formfld unknown" />
319
									<br />
320
									<?php printf(gettext("Proxy port to use when %s connects to the proxy URL configured above. Default is 8080 for http protocol or 443 for ssl."),$g['product']); ?>
321
								</td>
322
							</tr>
323
							<tr>
324
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
325
								<td width="78%" class="vtable">
326
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo $pconfig['proxyuser']; ?>" class="formfld unknown" />
327
									<br />
328
									<?php printf(gettext("Proxy username for allowing %s to use this proxy to connect outside"),$g['product']); ?>
329
								</td>
330
							</tr>
331
							<tr>
332
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Pass"); ?></td>
333
								<td width="78%" class="vtable">
334
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo $pconfig['proxypass']; ?>" class="formfld unknown" />
335
									<br />
336
									<?php printf(gettext("Proxy password for allowing %s to use this proxy to connect outside"),$g['product']); ?>
337
								</td>
338
							</tr>
339
							<tr>
340
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
341
							</tr>
342
							<tr>
343
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
344
								<td width="78%" class="vtable">
345
									<input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> onclick="sticky_checked(this)" />
346
									<strong><?=gettext("Use sticky connections"); ?></strong><br />
347
									<?=gettext("Successive connections will be redirected to the servers " .
348
									"in a round-robin manner with connections from the same " .
349
									"source being sent to the same web server. This 'sticky " .
350
									"connection' will exist as long as there are states that " .
351
									"refer to this connection. Once the states expire, so will " .
352
									"the sticky connection. Further connections from that host " .
353
									"will be redirected to the next web server in the round " .
354
									"robin. Changing this option will restart the Load Balancing service."); ?>
355
									<br />
356
									<input name="srctrack" id="srctrack" value="<?php if ($pconfig['srctrack'] <> "") echo $pconfig['srctrack']; else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['lb_use_sticky'] == false) echo "disabled=\"disabled\""; ?> />
357
									<br />
358
									<?=gettext("Set the source tracking timeout for sticky connections. " .
359
									"By default this is 0, so source tracking is removed as soon as the state expires. " .
360
									"Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
361
								</td>
362
							</tr>
363
							<tr>
364
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
365
								<td width="78%" class="vtable">
366
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
367
									<strong><?=gettext("Allow default gateway switching"); ?></strong><br />
368
									<?=gettext("If the link where the default gateway resides fails " .
369
									"switch the default gateway to another available one."); ?>
370
								</td>
371
							</tr>
372
							<tr>
373
								<td colspan="2" class="list" height="12">&nbsp;</td>
374
							</tr>
375
							<tr>
376
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
377
							</tr>
378
							<tr>
379
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
380
								<td width="78%" class="vtable">
381
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked=\"checked\""; ?> />
382
									<strong><?=gettext("Use PowerD"); ?></strong><br />
383
									<br />
384
									<?=gettext("On AC Power Mode"); ?>&nbsp;:&nbsp;
385
									<select name="powerd_ac_mode" id="powerd_ac_mode">
386
										<option value="hadp"<?php if($pconfig['powerd_ac_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
387
										<option value="adp"<?php if($pconfig['powerd_ac_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
388
										<option value="min"<?php if($pconfig['powerd_ac_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
389
										<option value="max"<?php if($pconfig['powerd_ac_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
390
									</select>
391
									&nbsp;&nbsp;
392
									<?=gettext("On Battery Power Mode"); ?>&nbsp;:&nbsp;
393
									<select name="powerd_battery_mode" id="powerd_battery_mode">
394
										<option value="hadp"<?php if($pconfig['powerd_battery_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
395
										<option value="adp"<?php if($pconfig['powerd_battery_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
396
										<option value="min"<?php if($pconfig['powerd_battery_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
397
										<option value="max"<?php if($pconfig['powerd_battery_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
398
									</select>
399
									<br /><br />
400
									<?=gettext("The powerd utility monitors the system state and sets various power control " .
401
									"options accordingly.  It offers four modes (maximum, minimum, adaptive " .
402
									"and hiadaptive) that can be individually selected while on AC power or batteries. " .
403
									"The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " .
404
									"min, adp, hadp.  Maximum mode chooses the highest performance values.  Minimum " .
405
									"mode selects the lowest performance values to get the most power savings. " .
406
									"Adaptive mode attempts to strike a balance by degrading performance when " .
407
									"the system appears idle and increasing it when the system is busy.  It " .
408
									"offers a good balance between a small performance loss for greatly " .
409
									"increased power savings.  Hiadaptive mode is alike adaptive mode, but " .
410
									"tuned for systems where performance and interactivity are more important " .
411
									"than power consumption.  It raises frequency faster, drops slower and " .
412
									"keeps twice lower CPU load."); ?>
413
								</td>
414
							</tr>
415
							<tr>
416
								<td colspan="2" class="list" height="12">&nbsp;</td>
417
							</tr>
418
							<tr>
419
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Hardware Acceleration"); ?></td>
420
							</tr>
421
							<tr>
422
								<td width="22%" valign="top" class="vncell"><?=gettext("Cryptographic Hardware"); ?></td>
423
								<td width="78%" class="vtable">
424
									<select name="crypto_hardware" id="crypto_hardware">
425
										<option value=""><?php echo gettext("None"); ?></option>
426
										<?php foreach ($crypto_modules as $cryptomod_name => $cryptomod_descr): ?>
427
											<option value="<?php echo $cryptomod_name; ?>" <?php if ($pconfig['crypto_hardware'] == $cryptomod_name) echo " selected=\"selected\""; ?>><?php echo "{$cryptomod_descr} ({$cryptomod_name})"; ?></option>
428
										<?php endforeach; ?>
429
									</select>
430
									<br />
431
									<?=gettext("A cryptographic accelerator module will use hardware support to speed up some " .
432
										"cryptographic functions on systems which have the chip. Do not enable this " .
433
										"option if you have a Hifn cryptographic acceleration card, as this will take " .
434
										"precedence and the Hifn card will not be used. Acceleration should be automatic " .
435
										"for IPsec when using a cipher supported by your chip, such as AES-128. OpenVPN " .
436
										"should be set for AES-128-CBC and have cryptodev enabled for hardware " .
437
										"acceleration."); ?>
438
									<br /><br />
439
									<?=gettext("If you do not have a crypto chip in your system, this option will have no " .
440
									"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
441
								</td>
442
							</tr>
443
							<tr>
444
								<td colspan="2" class="list" height="12">&nbsp;</td>
445
							</tr>
446
							<tr>
447
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Thermal Sensors"); ?></td>
448
							</tr>
449
							<tr>
450
								<td width="22%" valign="top" class="vncell"><?=gettext("Thermal Sensors"); ?></td>
451
								<td width="78%" class="vtable">
452
								<select name="thermal_hardware" id="thermal_hardware">
453
									<option value=""><?php echo gettext("None/ACPI"); ?></option>
454
									<?php foreach ($thermal_hardware_modules as $themalmod_name => $themalmod_descr): ?>
455
										<option value="<?php echo $themalmod_name; ?>" <?php if ($pconfig['thermal_hardware'] == $themalmod_name) echo " selected=\"selected\""; ?>><?php echo "{$themalmod_descr} ({$themalmod_name})"; ?></option>
456
									<?php endforeach; ?>
457
								</select>
458
								<br />
459
								<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
460
										"driver to read its temperature. Setting this to 'None' will attempt to read the " .
461
										"temperature from an ACPI-compliant motherboard sensor instead, if one is present."); ?>
462
								<br /><br />
463
								<?=gettext("If you do not have a supported thermal sensor chip in your system, this option will have no " .
464
									"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
465
								</td>
466
							</tr>
467
							<tr>
468
								<td colspan="2" class="list" height="12">&nbsp;</td>
469
							</tr>
470
							<tr>
471
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
472
							</tr>
473
							<tr>
474
								<td width="22%" valign="top" class="vncell">&nbsp;</td>
475
								<td width="78%" class="vtable">
476
									<?=gettext("These settings have moved to <a href=\"vpn_ipsec_settings.php\">VPN &gt; IPsec on the Advanced Settings tab</a>."); ?>
477
								</td>
478
							</tr>
479
							<tr>
480
								<td colspan="2" class="list" height="12">&nbsp;</td>
481
							</tr>
482
							<tr>
483
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
484
							</tr>
485
							<tr>
486
								<td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
487
								<td width="78%" class="vtable">
488
									<input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked=\"checked\""; ?> />
489
									<br />
490
									<?=gettext("By default schedules clear the states of existing connections when the expiration time has come. ".
491
									"This option overrides that behavior by not clearing states for existing connections."); ?>
492
								</td>
493
							</tr>
494
							<tr>
495
								<td colspan="2" class="list" height="12">&nbsp;</td>
496
							</tr>
497
							<tr>
498
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td>
499
							</tr>
500
							<tr>
501
								<td width="22%" valign="top" class="vncell"><?=gettext("State Killing on Gateway Failure"); ?></td>
502
								<td width="78%" class="vtable">
503
									<input name="kill_states" type="checkbox" id="kill_states" value="yes" <?php if ($pconfig['kill_states']) echo "checked=\"checked\""; ?> />
504
									<br />
505
									<?=gettext("The monitoring process will flush states for a gateway that goes down if this box is not checked. Check this box to disable this behavior."); ?>
506
								</td>
507
							</tr>
508
							<tr>
509
								<td width="22%" valign="top" class="vncell"><?=gettext("Skip rules when gateway is down"); ?></td>
510
								<td width="78%" class="vtable">
511
									<input name="skip_rules_gw_down" type="checkbox" id="skip_rules_gw_down" value="yes" <?php if ($pconfig['skip_rules_gw_down']) echo "checked=\"checked\""; ?> />
512
									<br />
513
									<?=gettext("By default, when a rule has a specific gateway set, and this gateway is down, ".
514
									"rule is created and traffic is sent to default gateway.This option overrides that behavior ".
515
									"and the rule is not created when gateway is down"); ?>
516
								</td>
517
							</tr>
518
							<tr>
519
								<td width="22%" valign="top" class="vncell"><?=gettext("Enable debugging messages of gateway monitoring daemon"); ?></td>
520
								<td width="78%" class="vtable">
521
									<input name="apinger_debug" type="checkbox" id="apinger_debug" value="yes" <?php if ($pconfig['apinger_debug']) echo "checked=\"checked\""; ?> />
522
									<br />
523
									<?=gettext("By default, gateway monitoring does not log its error messages, ".
524
									"by toggling this setting the daemon would enable logging its messages to syslog."); ?>
525
								</td>
526
							</tr>
527
							<tr>
528
								<td colspan="2" valign="top" class="listtopic"><?=gettext("RAM Disk Settings (Reboot to Apply Changes)"); ?></td>
529
							</tr>
530
							<?php if ($g['platform'] == "pfSense"): ?>
531
							<tr>
532
								<td width="22%" valign="top" class="vncell"><?=gettext("Use RAM Disks"); ?></td>
533
								<td width="78%" class="vtable">
534
									<input name="use_mfs_tmpvar" type="checkbox" id="use_mfs_tmpvar" value="yes" <?php if ($pconfig['use_mfs_tmpvar']) echo "checked=\"checked\""; ?> onclick="tmpvar_checked(this)" />
535
									<strong><?=gettext("Use memory file system for /tmp and /var"); ?></strong><br />
536
									<?=gettext("Set this if you wish to use /tmp and /var as RAM disks (memory file system disks) on a full install " .
537
									"rather than use the hard disk. Setting this will cause the data in /tmp and /var to be lost at reboot, including log data. RRD and DHCP Leases will be retained."); ?>
538
								</td>
539
							</tr>
540
							<?php endif; ?>
541
							<tr>
542
								<td width="22%" valign="top" class="vncell"><?=gettext("/tmp RAM Disk Size"); ?></td>
543
								<td width="78%" class="vtable">
544
									<input name="use_mfs_tmp_size" id="use_mfs_tmp_size" value="<?php if ($pconfig['use_mfs_tmp_size'] <> "") echo $pconfig['use_mfs_tmp_size']; ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
545
									<br />
546
									<?=gettext("Set the size, in MB, for the /tmp RAM disk. " .
547
									"Leave blank for 40MB. Do not set lower than 40."); ?>
548
								</td>
549
							</tr>
550
							<tr>
551
								<td width="22%" valign="top" class="vncell"><?=gettext("/var RAM Disk Size"); ?></td>
552
								<td width="78%" class="vtable">
553
									<input name="use_mfs_var_size" id="use_mfs_var_size" value="<?php if ($pconfig['use_mfs_var_size'] <> "") echo $pconfig['use_mfs_var_size']; ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
554
									<br />
555
									<?=gettext("Set the size, in MB, for the /var RAM disk. " .
556
									"Leave blank for 60MB. Do not set lower than 60."); ?>
557
								</td>
558
							</tr>
559
							<tr>
560
								<td width="22%" valign="top" class="vncell"><?=gettext("Periodic RRD Backup");?></td>
561
								<td width="78%" class="vtable">
562
									<?=gettext("Frequency:");?>
563
									<select name="rrdbackup" id="rrdbackup" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> >
564
										<option value='0' <?php if (!isset($config['system']['rrdbackup']) || ($config['system']['rrdbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
565
									<?php for ($x=1; $x<=24; $x++) { ?>
566
										<option value='<?= $x ?>' <?php if ($config['system']['rrdbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
567
									<?php } ?>
568
									</select>
569
									<br />
570
									<?=gettext("This will periodically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
571
									<br />
572
									<br />
573
								</td>
574
							</tr>
575
							<tr>
576
								<td width="22%" valign="top" class="vncell"><?=gettext("Periodic DHCP Leases Backup");?></td>
577
								<td width="78%" class="vtable">
578
									<?=gettext("Frequency:");?>
579
									<select name="dhcpbackup" id="dhcpbackup" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> >
580
										<option value='0' <?php if (!isset($config['system']['dhcpbackup']) || ($config['system']['dhcpbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
581
									<?php for ($x=1; $x<=24; $x++) { ?>
582
										<option value='<?= $x ?>' <?php if ($config['system']['dhcpbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
583
									<?php } ?>
584
									</select>
585
									<br />
586
									<?=gettext("This will periodically backup the DHCP leases data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
587
									<br />
588
									<br />
589
								</td>
590
							</tr>
591
							<tr>
592
								<td colspan="2" class="list" height="12">&nbsp;</td>
593
							</tr>
594
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
595
							<tr>
596
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
597
							</tr>
598
							<tr>
599
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
600
								<td width="78%" class="vtable">
601
									<select name="harddiskstandby" class="formselect">
602
										<?php
603
											## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
604
											$sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242");
605
										?>
606
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected="selected"');?>><?=gettext("Always on"); ?></option>
607
										<?php
608
											foreach ($sbvals as $sbval):
609
												list($min,$val) = explode(",", $sbval);
610
										?>
611
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected="selected"');?>><?=$min;?> <?=gettext("minutes"); ?></option>
612
										<?php endforeach; ?>
613
									</select>
614
									<br />
615
									<?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
616
									"access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
617
								</td>
618
							</tr>
619
							<tr>
620
								<td colspan="2" class="list" height="12">&nbsp;</td>
621
							</tr>
622
							<?php endif; ?>
623

    
624
							<tr>
625
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
626
							</tr>
627
							<tr>
628
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
629
								<td width="78%" class="vtable">
630
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
631
									<strong><?=gettext("Do NOT check package signature"); ?></strong><br />
632
									<?=gettext("Enable this option to allow pfSense to install any package without checking its signature."); ?>
633
								</td>
634
							</tr>
635

    
636
							<tr>
637
								<td width="22%" valign="top">&nbsp;</td>
638
								<td width="78%">
639
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
640
								</td>
641
							</tr>
642
						</table>
643
					</div>
644
				</td>
645
			</tr>
646
		</table>
647
	</form>
648

    
649
<?php include("fend.inc"); ?>
650
</body>
651
</html>
(207-207/256)