summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.cdrom
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-25 08:08:24 -0300
committerRenato Botelho <renato@netgate.com>2015-08-25 14:49:54 -0300
commit46bc6e545a17e77202aaf01ec0cd8d5a46567525 (patch)
tree32d18dda436ec739c67c489ceb771e8629cd926f /src/etc/rc.cdrom
parent4d9801c2dbd2b3e54a39578ee62b93af66607227 (diff)
downloadpfsense-46bc6e545a17e77202aaf01ec0cd8d5a46567525.zip
pfsense-46bc6e545a17e77202aaf01ec0cd8d5a46567525.tar.gz
Move main pfSense content to src/
Diffstat (limited to 'src/etc/rc.cdrom')
-rwxr-xr-xsrc/etc/rc.cdrom39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/etc/rc.cdrom b/src/etc/rc.cdrom
new file mode 100755
index 0000000..5e8d80f
--- /dev/null
+++ b/src/etc/rc.cdrom
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# rc.cdrom - livedisc specific routines
+# For pfSense
+
+# Size of memory file system /cf/conf partition
+partsize="6m"
+
+export VARMFS_COPYDBPKG=yes
+
+for i in tmp varmfs etcmfs; do
+ if [ -f /etc/rc.d/$i ]; then
+ sh /etc/rc.d/$i start
+ fi
+done
+
+# Start PFI
+/bin/sh /scripts/pfi start
+
+# If PFI did not find a config, we should create
+# a tiny mfs under /cf/conf and populate with stock
+# configuration.
+if [ ! -f /conf/config.xml ]; then
+ echo -n "Generating a MFS /conf partition... "
+ device=$(mdconfig -a -t malloc -s ${partsize})
+ newfs /dev/${device} > /dev/null 2>&1
+ mount /dev/${device} /cf/conf
+ cp /conf.default/* /cf/conf
+ echo "done."
+fi
+
+echo -n "Generating a MFS /home partition... "
+device=$(mdconfig -a -t malloc -s ${partsize})
+newfs /dev/${device} > /dev/null 2>&1
+mount /dev/${device} /home
+echo "done."
+
+# Create some needed directories
+/bin/mkdir -p /var/tmp/vi.recover/
OpenPOWER on IntegriCloud