summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-05-21 19:54:18 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-05-21 19:54:18 -0400
commit842878b5991ceafe43a67c243ba85b4c70082367 (patch)
tree73aa2a228087ec18c2e39d80c097bf5914351fb7 /etc/rc
parentce8efd06df9b3823674757f8422a582076bf1d01 (diff)
downloadpfsense-842878b5991ceafe43a67c243ba85b4c70082367.zip
pfsense-842878b5991ceafe43a67c243ba85b4c70082367.tar.gz
Unbreak nanobsd since Ticket #444
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc45
1 files changed, 21 insertions, 24 deletions
diff --git a/etc/rc b/etc/rc
index 4ccca9f..7c41c3a 100755
--- a/etc/rc
+++ b/etc/rc
@@ -22,20 +22,36 @@ export HOME PATH
# Set our operating platform
PLATFORM=`cat /etc/platform`
+# Set our current version
+version=`cat /etc/version`
+
# Mount memory file system if it exists
echo -n "Mounting filesystems..."
-/sbin/mount -rw -a
+
+if [ "$PLATFORM" = "cdrom" ]; then
+ /etc/rc.cdrom
+fi
+
+if [ "$PLATFORM" = "embedded" ]; then
+ /etc/rc.embedded
+fi
+
+if [ "$PLATFORM" = "nanobsd" ]; then
+ /etc/rc.embedded
+fi
+
+if [ "$PLATFORM" = "pfSense" ]; then
+ mdmfs -S -M -s 4m md /var/run
+fi
# Mount /. If it fails run a fsck.
if [ ! "$PLATFORM" = "cdrom" ] ; then
if [ "$PLATFORM" = "nanobsd" ]; then
- /sbin/mount -rw / || (/sbin/fsck -fy; /sbin/mount -rw /)
- /sbin/mount -rw /cf || (/sbin/fsck -fy; /sbin/mount -rw /cf)
+ /sbin/mount -uw / || (/sbin/fsck -fy; /sbin/mount -uw /)
else
/sbin/mount -a || (/sbin/fsck -fy; /sbin/mount -a)
fi
- # If /conf is a directory, convert it to a symlink
- # to /cf/conf
+ # If /conf is a directory, convert it to a symlink to /cf/conf
if [ -d "/conf" ]; then
# If item is not a symlink then rm and recreate
CONFPOINTSTO=`readlink /conf`
@@ -53,25 +69,6 @@ if grep -q cf /etc/fstab; then
(/sbin/umount /cf; /sbin/fsck -fy /cf; /sbin/mount -w /cf)
fi
-# Set our current version
-version=`cat /etc/version`
-
-if [ "$PLATFORM" = "cdrom" ]; then
- /etc/rc.cdrom
-fi
-
-if [ "$PLATFORM" = "embedded" ]; then
- /etc/rc.embedded
-fi
-
-if [ "$PLATFORM" = "nanobsd" ]; then
- /etc/rc.embedded
-fi
-
-if [ "$PLATFORM" = "pfSense" ]; then
- mdmfs -S -M -s 4m md /var/run
-fi
-
product=`grep product_name /etc/inc/globals.inc | cut -d'"' -f4`
hideplatform=`grep hideplatform /etc/inc/globals.inc | wc -l`
varrunpath=`grep varrun_path /etc/inc/globals.inc | cut -d'"' -f4`
OpenPOWER on IntegriCloud