summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.embedded
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-26 15:12:02 -0300
committerRenato Botelho <renato@netgate.com>2015-08-26 15:12:02 -0300
commit03b19a93f4d8d870507ee96121cee4acd748dd2a (patch)
tree71a34e9e7e73d13de21cb4ad831799fb10c30df4 /src/etc/rc.embedded
parent7f410a121522c5d0e2660256ae50c1fde1df3645 (diff)
parent30ce58ac1ea27b758d5112cb5a3b190c9760f010 (diff)
downloadpfsense-03b19a93f4d8d870507ee96121cee4acd748dd2a.zip
pfsense-03b19a93f4d8d870507ee96121cee4acd748dd2a.tar.gz
Merge branch 'master' into bootstrap
Diffstat (limited to 'src/etc/rc.embedded')
-rwxr-xr-xsrc/etc/rc.embedded32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/etc/rc.embedded b/src/etc/rc.embedded
new file mode 100755
index 0000000..663822d
--- /dev/null
+++ b/src/etc/rc.embedded
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# rc.embedded - embedded system specific startup information
+# For pfSense
+
+# Size of /tmp
+USE_MFS_TMP_SIZE=`/usr/bin/grep use_mfs_tmp_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'`
+if [ ! -z ${USE_MFS_TMP_SIZE} ] && [ ${USE_MFS_TMP_SIZE} -gt 0 ]; then
+ tmpsize="${USE_MFS_TMP_SIZE}m"
+else
+ tmpsize="40m"
+fi
+
+# Size of /var
+USE_MFS_VAR_SIZE=`/usr/bin/grep use_mfs_var_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'`
+if [ ! -z ${USE_MFS_VAR_SIZE} ] && [ ${USE_MFS_VAR_SIZE} -gt 0 ]; then
+ varsize="${USE_MFS_VAR_SIZE}m"
+else
+ varsize="60m"
+fi
+
+echo -n "Setting up memory disks..."
+mdmfs -S -M -s ${tmpsize} md /tmp
+mdmfs -S -M -s ${varsize} md /var
+
+# Create some needed directories
+/bin/mkdir -p /var/db /var/spool/lock
+/usr/sbin/chown uucp:dialer /var/spool/lock
+
+# Ensure vi's recover directory is present
+/bin/mkdir -p /var/tmp/vi.recover/
+echo " done."
OpenPOWER on IntegriCloud