diff options
author | Chris Buechler <cmb@pfsense.org> | 2010-05-19 21:08:44 -0400 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2010-05-19 21:08:44 -0400 |
commit | c4995e627e26d2241b6dccc0e81137e5c5b37772 (patch) | |
tree | e54c824e76ea799a102ecf9aa610cf5467eae6cf | |
parent | a23a6db321a96c896217009a1f59ac18d30ecceb (diff) | |
download | pfsense-c4995e627e26d2241b6dccc0e81137e5c5b37772.zip pfsense-c4995e627e26d2241b6dccc0e81137e5c5b37772.tar.gz |
move mount up for cases where /usr and other partitions may be separate, and needed for other things to function
-rwxr-xr-x | etc/rc | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -22,6 +22,33 @@ export HOME PATH # Set our operating platform PLATFORM=`cat /etc/platform` +# Mount memory file system if it exists +echo -n "Mounting filesystems..." +/sbin/mount -a + +# Mount /. If it fails run a fsck. +if [ ! "$PLATFORM" = "cdrom" ] ; then + /sbin/mount -uw / || (/sbin/fsck -fy; /sbin/mount -uw /) + + # 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` + if ! test "x$CONFPOINTSTO" = "x/cf/conf"; then + rm -rf /conf + ln -s /cf/conf /conf + fi + fi +fi + +# Check to see if a compact flash mountpoint exists +# If it fails to mount then run a fsck -fy +if grep -q cf /etc/fstab; then + /sbin/mount -uw /cf || \ + (/sbin/umount /cf; /sbin/fsck -fy /cf; /sbin/mount -w /cf) +fi + # Set our current version version=`cat /etc/version` @@ -41,9 +68,9 @@ if [ "$PLATFORM" = "pfSense" ]; then mdmfs -S -M -s 4m md /var/run fi -product=`cat /etc/inc/globals.inc | grep product_name | cut -d'"' -f4` -hideplatform=`cat /etc/inc/globals.inc | grep hideplatform | wc -l` -varrunpath=`cat /etc/inc/globals.inc | grep varrun_path | cut -d'"' -f4` +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` if [ "$hideplatform" -gt "0" ]; then platformbanner="" # hide the platform @@ -61,33 +88,6 @@ echo # Enable console output if its muted. /sbin/conscontrol mute off >/dev/null -# Mount memory file system if it exists -echo -n "Mounting filesystems..." -/sbin/mount -a - -# Mount /. If it fails run a fsck. -if [ ! "$PLATFORM" = "cdrom" ] ; then - /sbin/mount -uw / || (/sbin/fsck -fy; /sbin/mount -uw /) - - # 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` - if ! test "x$CONFPOINTSTO" = "x/cf/conf"; then - rm -rf /conf - ln -s /cf/conf /conf - fi - fi -fi - -# Check to see if a compact flash mountpoint exists -# If it fails to mount then run a fsck -fy -if grep -q cf /etc/fstab; then - /sbin/mount -uw /cf || \ - (/sbin/umount /cf; /sbin/fsck -fy /cf; /sbin/mount -w /cf) -fi - if [ "$PLATFORM" = "cdrom" ] ; then # do nothing for cdrom platform elif [ "$PLATFORM" = "embedded" ] ; then |