Project

General

Profile

Download (2.65 KB) Statistics
| Branch: | Tag: | Revision:
1 65e2c06c Erik
<?php
2
/****h* pfSense/config
3
 * NAME
4 032c40c7 Scott Ullrich
 *   config.gui.inc - Functions to manipulate config.xml
5 65e2c06c Erik
 * DESCRIPTION
6
 *   This include contains various config.xml specific functions.
7
 * HISTORY
8
 * $Id$
9
 ******
10
11 032c40c7 Scott Ullrich
	config.gui.inc
12
	Copyright (C) 2004-2010 Scott Ullrich
13 65e2c06c Erik
	All rights reserved.
14
15
	originally part of m0n0wall (http://m0n0.ch/wall)
16
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
17
	All rights reserved.
18
19
	Redistribution and use in source and binary forms, with or without
20
	modification, are permitted provided that the following conditions are met:
21
22
	1. Redistributions of source code must retain the above copyright notice,
23
	   this list of conditions and the following disclaimer.
24
25
	2. Redistributions in binary form must reproduce the above copyright
26
	   notice, this list of conditions and the following disclaimer in the
27
	   documentation and/or other materials provided with the distribution.
28
29
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
30
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
31
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
33
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
	POSSIBILITY OF SUCH DAMAGE.
39
40
41 5ba5a8de Scott Ullrich
	pfSense_BUILDER_BINARIES:	/sbin/mount	/sbin/sysctl	/sbin/umount	/sbin/halt	/sbin/fsck
42 65e2c06c Erik
	pfSense_MODULE:	config
43
*/
44
45 06f61915 Ermal Lu?i
require_once("globals.inc");
46
47 65e2c06c Erik
/* do not load this file twice. */
48 1883455a Ermal
if($config_parsed == true)
49 65e2c06c Erik
	return;
50
else
51 1883455a Ermal
	$config_parsed = true;
52 65e2c06c Erik
53
/* include globals from notices.inc /utility/XML parser files */
54
require_once('config.lib.inc');
55
require_once("notices.inc");
56
require_once("util.inc");
57 9b1ff028 Seth Mos
require_once("IPv6.inc");
58 093bcebc Scott Ullrich
if(file_exists("/cf/conf/use_xmlreader"))
59
	require_once("xmlreader.inc");
60
else
61
	require_once("xmlparse.inc");
62 65e2c06c Erik
require_once("crypt.inc");
63
64
/* read platform */
65
if (file_exists("{$g['etc_path']}/platform")) {
66
	$g['platform'] = chop(file_get_contents("{$g['etc_path']}/platform"));
67
} else {
68
	$g['platform'] = "unknown";
69
}
70
71
/* if /debugging exists, lets set $debugging
72
   so we can output more information */
73
if(file_exists("/debugging")) {
74
	$debugging = true;
75
	$g['debug'] = true;
76
}
77
78
$config = parse_config();
79
80
if($config_parsed == true) {
81
	/* process packager manager custom rules */
82
	if(is_dir("/usr/local/pkg/parse_config")) {
83
		run_plugins("/usr/local/pkg/parse_config/");
84
	}
85
}
86
87 9b1ff028 Seth Mos
?>