Project

General

Profile

Download (1.37 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
#!/bin/sh
2
3 e5cd29a0 Scott Ullrich
# /etc/rc - master bootup script, invokes php setup
4
# part of pfSense by Scott Ullrich
5
# Copyright (C) 2004 Scott Ullrich, All rights reserved.
6
# originally based on m0n0wall (http://neon1.net/m0n0wall)
7 5b237745 Scott Ullrich
# Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
# All rights reserved.
9
10
stty status '^T'
11
12
trap : 2
13
trap : 3
14
15
HOME=/
16
PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
export HOME PATH
18
19 e5cd29a0 Scott Ullrich
echo
20
echo "Starting pfSense ..."
21
echo
22
23 5b237745 Scott Ullrich
/sbin/mount -a || fsck -y && mount -a
24
25
set -T
26
trap "echo 'Reboot interrupted'; exit 1" 3
27
28
# make some directories in /var
29
mkdir /var/run /var/log /var/etc /var/db/ipf 2>/dev/null
30
chmod 0755 /var/db/ipf
31
rm -rf /var/log/*
32
33
# generate circular logfiles
34
clog -i -s 262144 /var/log/system.log
35
clog -i -s 262144 /var/log/filter.log
36
clog -i -s 32768 /var/log/dhcpd.log
37
clog -i -s 32768 /var/log/vpn.log
38 3f2b92d2 Scott Ullrich
clog -i -s 32768 /var/log/portalauth.log
39
chmod 0600 /var/log/system.log /var/log/filter.log /var/log/dhcpd.log /var/log/vpn.log /var/log/portalauth.log
40 5b237745 Scott Ullrich
41
adjkerntz -i
42
43
#mount_devfs devfs /dev
44
45
# Create an initial utmp file
46
cd /var/run && cp /dev/null utmp && chmod 644 utmp
47
48
# Build devices database
49
#dev_mkdb
50
51
# Run ldconfig
52
/sbin/ldconfig -elf /usr/lib
53
54
# let the PHP-based configuration subsystem set up the system now
55
/etc/rc.bootup
56
57 72996c17 Scott Ullrich
/sbin/pfctl -f /tmp/rules.debug >/dev/null 2>&1
58
/sbin/pfctl -e >/dev/null 2>&1
59 5b237745 Scott Ullrich
60
echo Starting Secure Shell Services ...
61
/etc/sshd
62
63
exit 0