summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc19
-rwxr-xr-xetc/rc.embedded10
2 files changed, 14 insertions, 15 deletions
diff --git a/etc/rc b/etc/rc
index f79400e..a925fd6 100755
--- a/etc/rc
+++ b/etc/rc
@@ -34,26 +34,33 @@ if [ "$PLATFORM" = "cdrom" ]; then
/etc/rc.cdrom
fi
-if [ "$PLATFORM" = "wrap" ]; then
+if [ "$PLATFORM" = "embedded" ]; then
/etc/rc.embedded
fi
# Enable console output if its muted.
/sbin/conscontrol mute off >/dev/null
+# Mount memory file system if it exists
+/sbin/mount -a
+
# Mount /. If it fails run a fsck.
if [ ! "$PLATFORM" = "cdrom" ] ; then
- /sbin/mount -w / || /sbin/fsck -y
+ /sbin/mount -uw / || (/sbin/fsck -y && /sbin/mount -uw /)
fi
# Check to see if a compact flash mountpoint exists
# If it fails to mount then run a fsck -y
-if grep cf /etc/fstab; then
- /sbin/mount -w /cf || /sbin/fsck -y
+if grep -q cf /etc/fstab; then
+ /sbin/mount -uw /cf || (/sbin/fsck -y && /sbin/mount -uw /cf)
fi
-# Mount memory file system if it exists
-/sbin/mount -a
+# If /conf is a directory, convert it to a symlink
+# to /cf/conf
+if [ -d "/conf" ]; then
+ rm -rf /conf
+ ln -s /cf/conf /conf
+fi
if [ "$PLATFORM" = "cdrom" ] ; then
# do nothing for cdrom platform
diff --git a/etc/rc.embedded b/etc/rc.embedded
index 3338dda..ed89bcc 100755
--- a/etc/rc.embedded
+++ b/etc/rc.embedded
@@ -6,10 +6,9 @@
# Size of memory file system /conf partition
partsize="3m"
-set -x
-
# Run some initialization routines
/etc/rc.d/uzip start
+/etc/rc.d/tmp start
# Initialize MFS for /var. Partly taken from /etc/rc.d/var
if (/bin/mkdir -p /var/.diskless 2> /dev/null); then
@@ -19,13 +18,6 @@ else
mdmfs -S -M -s ${varsize} md /var
fi
-
-for i in tmp; do
- if [ -f /etc/rc.d/$i ]; then
- sh /etc/rc.d/$i start
- fi
-done
-
# Create some needed directories
/bin/mkdir -p /var/db/pkg/
/bin/mkdir -p /var/tmp/vi.recover/
OpenPOWER on IntegriCloud