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