summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.cdrom
diff options
context:
space:
mode:
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