Project

General

Profile

Download (948 Bytes) Statistics
| Branch: | Tag: | Revision:
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 e92e83d4 jim-p
USE_MFS_TMP_SIZE=`/usr/bin/grep use_mfs_tmp_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'`
8 8ad8b044 Phil Davis
if [ ! -z ${USE_MFS_TMP_SIZE} ] && [ ${USE_MFS_TMP_SIZE} -gt 0 ]; then
9 e92e83d4 jim-p
	tmpsize="${USE_MFS_TMP_SIZE}m"
10
else
11
	tmpsize="40m"
12
fi
13 cff48183 Scott Ullrich
14
# Size of /var
15 e92e83d4 jim-p
USE_MFS_VAR_SIZE=`/usr/bin/grep use_mfs_var_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'`
16 8ad8b044 Phil Davis
if [ ! -z ${USE_MFS_VAR_SIZE} ] && [ ${USE_MFS_VAR_SIZE} -gt 0 ]; then
17 e92e83d4 jim-p
	varsize="${USE_MFS_VAR_SIZE}m"
18
else
19
	varsize="60m"
20
fi
21 cff48183 Scott Ullrich
22 c613b74f Scott Ullrich
# Run some initialization routines
23 deb0fc81 Scott Ullrich
[ -f /etc/rc.d/uzip ] && /etc/rc.d/uzip start
24 e9f2dd08 Scott Ullrich
25 e92e83d4 jim-p
echo -n "Setting up memory disks..."
26
mdmfs -S -M -s ${tmpsize} md /tmp
27
mdmfs -S -M -s ${varsize} md /var
28 c613b74f Scott Ullrich
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 8ad8b044 Phil Davis
echo " done."