1 |
c613b74f
|
Scott Ullrich
|
#!/bin/sh
|
2 |
|
|
#
|
3 |
ac24dc24
|
Renato Botelho
|
# rc.embedded
|
4 |
|
|
#
|
5 |
|
|
# part of pfSense (https://www.pfsense.org)
|
6 |
b8f91b7c
|
Luiz Souza
|
# Copyright (c) 2004-2018 Rubicon Communications, LLC (Netgate)
|
7 |
ac24dc24
|
Renato Botelho
|
# All rights reserved.
|
8 |
|
|
#
|
9 |
b12ea3fb
|
Renato Botelho
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
10 |
|
|
# you may not use this file except in compliance with the License.
|
11 |
|
|
# You may obtain a copy of the License at
|
12 |
ac24dc24
|
Renato Botelho
|
#
|
13 |
b12ea3fb
|
Renato Botelho
|
# http://www.apache.org/licenses/LICENSE-2.0
|
14 |
ac24dc24
|
Renato Botelho
|
#
|
15 |
b12ea3fb
|
Renato Botelho
|
# Unless required by applicable law or agreed to in writing, software
|
16 |
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
17 |
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18 |
|
|
# See the License for the specific language governing permissions and
|
19 |
|
|
# limitations under the License.
|
20 |
c613b74f
|
Scott Ullrich
|
|
21 |
cff48183
|
Scott Ullrich
|
# Size of /tmp
|
22 |
a5c36eb2
|
Renato Botelho
|
USE_MFS_TMP_SIZE=$(/usr/local/sbin/read_xml_tag.sh string system/use_mfs_tmp_size)
|
23 |
|
|
if [ -n "${USE_MFS_TMP_SIZE}" ] && [ ${USE_MFS_TMP_SIZE} -gt 0 ]; then
|
24 |
e92e83d4
|
jim-p
|
tmpsize="${USE_MFS_TMP_SIZE}m"
|
25 |
|
|
else
|
26 |
|
|
tmpsize="40m"
|
27 |
|
|
fi
|
28 |
cff48183
|
Scott Ullrich
|
|
29 |
|
|
# Size of /var
|
30 |
a5c36eb2
|
Renato Botelho
|
USE_MFS_VAR_SIZE=$(/usr/local/sbin/read_xml_tag.sh string system/use_mfs_var_size)
|
31 |
|
|
if [ -n "${USE_MFS_VAR_SIZE}" ] && [ ${USE_MFS_VAR_SIZE} -gt 0 ]; then
|
32 |
e92e83d4
|
jim-p
|
varsize="${USE_MFS_VAR_SIZE}m"
|
33 |
|
|
else
|
34 |
|
|
varsize="60m"
|
35 |
|
|
fi
|
36 |
cff48183
|
Scott Ullrich
|
|
37 |
e92e83d4
|
jim-p
|
echo -n "Setting up memory disks..."
|
38 |
|
|
mdmfs -S -M -s ${tmpsize} md /tmp
|
39 |
|
|
mdmfs -S -M -s ${varsize} md /var
|
40 |
c613b74f
|
Scott Ullrich
|
|
41 |
|
|
# Create some needed directories
|
42 |
d71cded0
|
Chris Buechler
|
/bin/mkdir -p /var/db /var/spool/lock
|
43 |
|
|
/usr/sbin/chown uucp:dialer /var/spool/lock
|
44 |
1ec24317
|
sullrich
|
|
45 |
|
|
# Ensure vi's recover directory is present
|
46 |
c613b74f
|
Scott Ullrich
|
/bin/mkdir -p /var/tmp/vi.recover/
|
47 |
8ad8b044
|
Phil Davis
|
echo " done."
|