summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multitech/recipes/multitech/config/config.init15
-rw-r--r--multitech/recipes/multitech/config_1.0.bb2
2 files changed, 13 insertions, 4 deletions
diff --git a/multitech/recipes/multitech/config/config.init b/multitech/recipes/multitech/config/config.init
index 11233c0..98bbf35 100644
--- a/multitech/recipes/multitech/config/config.init
+++ b/multitech/recipes/multitech/config/config.init
@@ -2,6 +2,7 @@
CONFIG_MTDC=/dev/mtd6
CONFIG_DIR=/var/config
+OEM_MTDC=/dev/mtd7
OEM_DIR=/var/oem
FILES="network/interfaces \
@@ -17,9 +18,6 @@ case $1 in
echo "Mounting ${CONFIG_DIR}"
mkdir -p ${CONFIG_DIR}
mount ${CONFIG_DIR}
- echo "Mounting ${OEM_DIR}"
- mkdir -p ${OEM_DIR}
- mount ${OEM_DIR}
# Prepare flash for JFFS2 if mount fails
if [ $? -ne 0 ]; then
@@ -28,6 +26,17 @@ case $1 in
mount ${CONFIG_DIR}
fi
+ echo "Mounting ${OEM_DIR}"
+ mkdir -p ${OEM_DIR}
+ mount ${OEM_DIR}
+
+ # Prepare flash for JFFS2 if mount fails
+ if [ $? -ne 0 ]; then
+ echo "Creating ${OEM_DIR}"
+ flash_eraseall -j ${OEM_MTDC}
+ mount ${OEM_DIR}
+ fi
+
# Default all config files if requested
cd ${CONFIG_DIR}
if [ -f force_defaults ]; then
diff --git a/multitech/recipes/multitech/config_1.0.bb b/multitech/recipes/multitech/config_1.0.bb
index 45a6c5f..2e22a86 100644
--- a/multitech/recipes/multitech/config_1.0.bb
+++ b/multitech/recipes/multitech/config_1.0.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Provides default system config files and /var/config fs"
SECTION = "base"
LICENSE = "GPL"
-PR = "r16"
+PR = "r17"
inherit update-rc.d