1 |
c613b74f
|
Scott Ullrich
|
#!/bin/sh
|
2 |
|
|
#
|
3 |
|
|
# rc.embedded - embedded system specific startup information
|
4 |
|
|
# For pfSense
|
5 |
|
|
|
6 |
cff48183
|
Scott Ullrich
|
# Size of /tmp
|
7 |
|
|
tmpsize="40m"
|
8 |
|
|
|
9 |
|
|
# Size of /var
|
10 |
081db683
|
Scott Ullrich
|
varsize="60m"
|
11 |
cff48183
|
Scott Ullrich
|
|
12 |
c613b74f
|
Scott Ullrich
|
# Run some initialization routines
|
13 |
deb0fc81
|
Scott Ullrich
|
[ -f /etc/rc.d/uzip ] && /etc/rc.d/uzip start
|
14 |
e9f2dd08
|
Scott Ullrich
|
|
15 |
83e638ce
|
Scott Ullrich
|
echo -n "Setting up embedded specific environment..."
|
16 |
|
|
# Initialize MFS for /tmp. Partly taken from /etc/rc.d/var
|
17 |
|
|
if (/bin/mkdir -p /tmp/.diskless 2> /dev/null); then
|
18 |
|
|
rmdir /tmp/.diskless
|
19 |
e9f2dd08
|
Scott Ullrich
|
else
|
20 |
83e638ce
|
Scott Ullrich
|
mdmfs -S -M -s ${tmpsize} md /tmp
|
21 |
|
|
fi
|
22 |
|
|
# Initialize MFS for /var. Partly taken from /etc/rc.d/var
|
23 |
|
|
if (/bin/mkdir -p /var/.diskless 2> /dev/null); then
|
24 |
|
|
rmdir /var/.diskless
|
25 |
|
|
else
|
26 |
|
|
mdmfs -S -M -s ${varsize} md /var
|
27 |
c613b74f
|
Scott Ullrich
|
fi
|
28 |
|
|
|
29 |
|
|
# Create some needed directories
|
30 |
1ec24317
|
sullrich
|
/bin/mkdir -p /var/db
|
31 |
|
|
|
32 |
|
|
# Ensure vi's recover directory is present
|
33 |
c613b74f
|
Scott Ullrich
|
/bin/mkdir -p /var/tmp/vi.recover/
|
34 |
ebe6a739
|
Scott Ullrich
|
echo " done."
|