Projet

Général

Profil

Télécharger (29,9 ko) Statistiques
| Branche: | Tag: | Révision:

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

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['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']);
68
$pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size'];
69
$pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size'];
70
$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
71

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

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

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

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

    
86
if ($_POST) {
87

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

    
91
	ob_flush();
92
	flush();
93

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

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

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

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

    
106
	if (!$input_errors) {
107

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
191
		if($_POST['use_mfs_tmpvar'] == "yes")
192
			$config['system']['use_mfs_tmpvar'] = true;
193
		else
194
			unset($config['system']['use_mfs_tmpvar']);
195

    
196
		$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
197
		$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
198

    
199
		if (isset($_POST['rrdbackup'])) {
200
			$config['system']['rrdbackup'] = $_POST['rrdbackup'];
201
			install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
202
		}
203
		if (isset($_POST['dhcpbackup'])) {
204
			$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
205
			install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
206
		}
207

    
208
		write_config();
209

    
210
		$retval = 0;
211
		system_resolvconf_generate(true);
212
		$retval = filter_configure();
213
		if(stristr($retval, "error") <> true)
214
			$savemsg = get_std_save_message(gettext($retval));
215
		else
216
			$savemsg = gettext($retval);
217

    
218
		activate_powerd();
219
		load_crypto();
220
		load_thermal_hardware();
221
		if ($need_relayd_restart)
222
			relayd_configure();
223
	}
224
}
225

    
226
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
227
include("head.inc");
228

    
229
?>
230

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

    
601
							<tr>
602
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
603
							</tr>
604
							<tr>
605
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
606
								<td width="78%" class="vtable">
607
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
608
									<strong><?=gettext("Do NOT check package signature"); ?></strong><br />
609
									<?=gettext("Enable this option to allow pfSense to install any package without checking its signature."); ?>
610
								</td>
611
							</tr>
612

    
613
							<tr>
614
								<td width="22%" valign="top">&nbsp;</td>
615
								<td width="78%">
616
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
617
								</td>
618
							</tr>
619
						</table>
620
					</div>
621
				</td>
622
			</tr>
623
		</table>
624
	</form>
625

    
626
<?php include("fend.inc"); ?>
627
</body>
628
</html>
(206-206/255)