summaryrefslogtreecommitdiff
path: root/multitech/recipes
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2013-04-18 17:13:25 -0500
committerJesse Gilles <jgilles@multitech.com>2013-04-18 17:13:25 -0500
commit3a015dd3e5d0c0cd4c864db8efda6ecf0f623908 (patch)
tree7bd492558560e14c81a0b0da72fa1e19fddcad3d /multitech/recipes
parent451372c8dbf45be204c40a2ec07451a12d28593c (diff)
config: fix oem partition erasing
Diffstat (limited to 'multitech/recipes')
-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