pfsense/etc/rc.embedded
Scott Ullrich 4f1842be28 Commit changes submit by Rajkumar S:
Checks for file named /nanobuild and invokes /etc/rc.initdiskless if found, otherwise it follows the normal embedded bootup.
2008-08-18 16:30:11 +00:00

38 lines
974 B
Bash
Executable File

#!/bin/sh
#
# rc.embedded - embedded system specific startup information
# For pfSense
# Size of memory file system /conf partition
partsize="3m"
echo -n "Setting up embedded specific environment..."
# Run some initialization routines
[ -f /etc/rc.d/uzip ] && /etc/rc.d/uzip start
if [ -f /nanobuild ]; then
# Init /etc and /var, /tmp to point towards /var/tmp
# All these to be done by rc.initdiskless
sh /etc/rc.initdiskless
else
# Initialize MFS for /tmp. Partly taken from /etc/rc.d/var
if (/bin/mkdir -p /tmp/.diskless 2> /dev/null); then
rmdir /tmp/.diskless
else
varsize="40m"
mdmfs -S -M -s ${varsize} md /tmp
fi
# Initialize MFS for /var. Partly taken from /etc/rc.d/var
if (/bin/mkdir -p /var/.diskless 2> /dev/null); then
rmdir /var/.diskless
else
varsize="20m"
mdmfs -S -M -s ${varsize} md /var
fi
fi
# Create some needed directories
/bin/mkdir -p /var/db/pkg/
/bin/mkdir -p /var/tmp/vi.recover/
echo " done."