1 |
1e6fdd81
|
Colin Smith
|
#!/bin/sh
|
2 |
|
|
#
|
3 |
|
|
# rc.cdrom - livedisc specific routines
|
4 |
|
|
# For pfSense
|
5 |
|
|
|
6 |
ec164e2b
|
Scott Ullrich
|
# Size of memory file system /conf /home partitions
|
7 |
ab1a08b2
|
Scott Ullrich
|
partsize="6m"
|
8 |
1e6fdd81
|
Colin Smith
|
|
9 |
b69df786
|
Scott Ullrich
|
# Run some initialization routines
|
10 |
|
|
/etc/rc.d/uzip start
|
11 |
|
|
|
12 |
819ccd08
|
Scott Ullrich
|
export VARMFS_COPYDBPKG=yes
|
13 |
|
|
|
14 |
75cf30df
|
Scott Ullrich
|
for i in tmp varmfs etcmfs; do
|
15 |
b69df786
|
Scott Ullrich
|
if [ -f /etc/rc.d/$i ]; then
|
16 |
ab1a08b2
|
Scott Ullrich
|
sh /etc/rc.d/$i start
|
17 |
b69df786
|
Scott Ullrich
|
fi
|
18 |
|
|
done
|
19 |
|
|
|
20 |
|
|
# Start PFI
|
21 |
|
|
/bin/sh /scripts/pfi start
|
22 |
|
|
|
23 |
|
|
# If PFI did not find a config, we should create
|
24 |
|
|
# a tiny mfs under /conf and populate with stock
|
25 |
|
|
# configuration.
|
26 |
|
|
if [ ! -f /conf/config.xml ]; then
|
27 |
819ccd08
|
Scott Ullrich
|
echo -n "Generating a MFS /conf partition... "
|
28 |
b69df786
|
Scott Ullrich
|
device=$(mdconfig -a -t malloc -s ${partsize})
|
29 |
|
|
newfs /dev/${device} > /dev/null 2>&1
|
30 |
|
|
mount /dev/${device} /conf
|
31 |
44a41e14
|
Scott Ullrich
|
cp /conf.default/* /conf
|
32 |
b69df786
|
Scott Ullrich
|
mount_nullfs /conf /cf/conf
|
33 |
6c80fac7
|
Scott Ullrich
|
echo "done."
|
34 |
5aa8f8c7
|
Scott Ullrich
|
fi
|
35 |
1e6fdd81
|
Colin Smith
|
|
36 |
1215fbb6
|
Scott Ullrich
|
echo -n "Generating a MFS /home partition... "
|
37 |
|
|
device=$(mdconfig -a -t malloc -s ${partsize})
|
38 |
|
|
newfs /dev/${device} > /dev/null 2>&1
|
39 |
|
|
mount /dev/${device} /home
|
40 |
|
|
echo "done."
|
41 |
|
|
|
42 |
1e6fdd81
|
Colin Smith
|
# Create some needed directories
|
43 |
23a115c5
|
Scott Ullrich
|
/bin/mkdir -p /var/db/pkg/
|
44 |
|
|
/bin/mkdir -p /var/tmp/vi.recover/
|