Project

General

Profile

Download (3.59 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/usr/local/bin/php -f
2
<?php
3
/*
4
	rc.bootup
5
	part of pfSense by Scott Ullrich
6
	originally based on m0n0wall (http://m0n0.ch/wall)
7

    
8
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
9
	All rights reserved.
10

    
11
	Redistribution and use in source and binary forms, with or without
12
	modification, are permitted provided that the following conditions are met:
13

    
14
	1. Redistributions of source code must retain the above copyright notice,
15
	   this list of conditions and the following disclaimer.
16

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

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

    
33
	require_once("globals.inc");
34

    
35
	/* let the other functions know we're booting */
36
	$g['booting'] = TRUE;
37
	touch("{$g['varrun_path']}/booting");
38

    
39
	/* parse the configuration and include all functions used below */
40
	require_once("config.inc");
41
	require_once("functions.inc");
42

    
43
	/* convert configuration, if necessary */
44
	convert_config();
45

    
46
	/* run any early shell commands specified in config.xml */
47
	system_do_shell_commands(1);
48

    
49
	/* save dmesg output to file */
50
	system_dmesg_save();
51

    
52
	/* set up our timezone */
53
	system_timezone_configure();
54

    
55
	/* set up our hostname */
56
	system_hostname_configure();
57

    
58
	/* make hosts file */
59
	system_hosts_generate();
60

    
61
	/* generate resolv.conf */
62
	system_resolvconf_generate();
63

    
64
	/* start pccardd */
65
	if (!in_array($g['platform'], $g['nopccard_platforms']))
66
		system_pccard_start();
67

    
68
	/* configure loopback interface */
69
	interfaces_loopback_configure();
70

    
71
	/* set up VLAN virtual interfaces */
72
	interfaces_vlan_configure();
73

    
74
	/* set up LAN interface */
75
	interfaces_lan_configure();
76

    
77
	/* set up WAN interface */
78
	interfaces_wan_configure();
79

    
80
	/* set up Optional interfaces */
81
	interfaces_optional_configure();
82

    
83
	/* start pflog */
84
	filter_pflog_start();
85

    
86
	/* setup altq + pf */
87
	filter_configure();
88

    
89
	/* start OpenVPN server & clients */
90
	ovpn_configure();
91

    
92
	/* set up static routes */
93
	system_routing_configure();
94

    
95
	/* enable routing */
96
	system_routing_enable();
97

    
98
	/* start syslogd */
99
	system_syslogd_start();
100

    
101
	/* start web server */
102
	system_webgui_start();
103

    
104
	/* configure console menu */
105
	system_console_configure();
106

    
107
	/* start dnsmasq service */
108
	services_dnsmasq_configure();
109

    
110
	/* start dyndns service */
111
	services_dyndns_configure();
112

    
113
	/* start DHCP service */
114
	services_dhcpd_configure();
115

    
116
	/* start SNMP service */
117
	services_snmpd_configure();
118

    
119
	/* start proxy ARP service */
120
	services_proxyarp_configure();
121

    
122
	/* start the NTP client */
123
	system_ntp_configure();
124

    
125
	/* start pptpd */
126
	vpn_pptpd_configure();
127

    
128
	/* start IPsec tunnels */
129
	vpn_ipsec_configure();
130

    
131
	/* start the captive portal */
132
	captiveportal_configure();
133

    
134
	/* execute the rc scripts of extensions */
135
	system_do_extensions();
136

    
137
	/* run any shell commands specified in config.xml */
138
	system_do_shell_commands();
139

    
140
	/* done */
141
	unlink("{$g['varrun_path']}/booting");
142
?>
(19-19/42)