1 |
c613b74f
|
Scott Ullrich
|
#!/bin/sh
|
2 |
|
|
#
|
3 |
ac24dc24
|
Renato Botelho
|
# rc.embedded
|
4 |
|
|
#
|
5 |
|
|
# part of pfSense (https://www.pfsense.org)
|
6 |
38809d47
|
Renato Botelho do Couto
|
# Copyright (c) 2004-2013 BSD Perimeter
|
7 |
|
|
# Copyright (c) 2013-2016 Electric Sheep Fencing
|
8 |
8f585441
|
Luiz Souza
|
# Copyright (c) 2014-2021 Rubicon Communications, LLC (Netgate)
|
9 |
ac24dc24
|
Renato Botelho
|
# All rights reserved.
|
10 |
|
|
#
|
11 |
b12ea3fb
|
Renato Botelho
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
12 |
|
|
# you may not use this file except in compliance with the License.
|
13 |
|
|
# You may obtain a copy of the License at
|
14 |
ac24dc24
|
Renato Botelho
|
#
|
15 |
b12ea3fb
|
Renato Botelho
|
# http://www.apache.org/licenses/LICENSE-2.0
|
16 |
ac24dc24
|
Renato Botelho
|
#
|
17 |
b12ea3fb
|
Renato Botelho
|
# Unless required by applicable law or agreed to in writing, software
|
18 |
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
19 |
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20 |
|
|
# See the License for the specific language governing permissions and
|
21 |
|
|
# limitations under the License.
|
22 |
c613b74f
|
Scott Ullrich
|
|
23 |
82bf21fc
|
jim-p
|
. /etc/rc.ramdisk_functions.sh
|
24 |
cff48183
|
Scott Ullrich
|
|
25 |
e92e83d4
|
jim-p
|
echo -n "Setting up memory disks..."
|
26 |
1ec24317
|
sullrich
|
|
27 |
82bf21fc
|
jim-p
|
if ramdisk_check_size && ramdisk_try_mount tmp && ramdisk_try_mount var; then
|
28 |
|
|
/bin/rm -f ${RAMDISK_FLAG_FILE}
|
29 |
|
|
# Create some needed directories
|
30 |
|
|
/bin/mkdir -p /var/db /var/spool/lock
|
31 |
|
|
/usr/sbin/chown uucp:dialer /var/spool/lock
|
32 |
|
|
# Ensure vi's recover directory is present
|
33 |
|
|
/bin/mkdir -p /var/tmp/vi.recover/
|
34 |
|
|
/bin/mkdir -p /var/crash/
|
35 |
|
|
echo " done."
|
36 |
|
|
else
|
37 |
|
|
/usr/bin/touch ${RAMDISK_FLAG_FILE}
|
38 |
|
|
/sbin/umount -f /tmp /var 2>/dev/null
|
39 |
|
|
echo " failed."
|
40 |
|
|
fi
|