Project

General

Profile

Download (852 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 a5c36eb2 Renato Botelho
USE_MFS_TMP_SIZE=$(/usr/local/sbin/read_xml_tag.sh string system/use_mfs_tmp_size)
8
if [ -n "${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 a5c36eb2 Renato Botelho
USE_MFS_VAR_SIZE=$(/usr/local/sbin/read_xml_tag.sh string system/use_mfs_var_size)
16
if [ -n "${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 e92e83d4 jim-p
echo -n "Setting up memory disks..."
23
mdmfs -S -M -s ${tmpsize} md /tmp
24
mdmfs -S -M -s ${varsize} md /var
25 c613b74f Scott Ullrich
26
# Create some needed directories
27 d71cded0 Chris Buechler
/bin/mkdir -p /var/db /var/spool/lock
28
/usr/sbin/chown uucp:dialer /var/spool/lock
29 1ec24317 sullrich
30
# Ensure vi's recover directory is present
31 c613b74f Scott Ullrich
/bin/mkdir -p /var/tmp/vi.recover/
32 8ad8b044 Phil Davis
echo " done."