summaryrefslogtreecommitdiff
path: root/recipes-core/multitech
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-12-07 13:46:37 -0600
committerJohn Klug <john.klug@multitech.com>2017-12-08 10:10:44 -0600
commitff6b2b574cfe500e35594d8735843f84e6ebbee3 (patch)
tree8b75f92a53ccf3f77edc321e46f884779b0f6b16 /recipes-core/multitech
parent00e36f9739f11b7b28f6d945777500e780af69dd (diff)
downloadmeta-mlinux-ff6b2b574cfe500e35594d8735843f84e6ebbee3.tar.gz
meta-mlinux-ff6b2b574cfe500e35594d8735843f84e6ebbee3.tar.bz2
meta-mlinux-ff6b2b574cfe500e35594d8735843f84e6ebbee3.zip
Add radio trial parameter for get-eeprom-device-info.sh
Diffstat (limited to 'recipes-core/multitech')
-rw-r--r--recipes-core/multitech/config/config.init81
1 files changed, 43 insertions, 38 deletions
diff --git a/recipes-core/multitech/config/config.init b/recipes-core/multitech/config/config.init
index 17ee777..8b1abe5 100644
--- a/recipes-core/multitech/config/config.init
+++ b/recipes-core/multitech/config/config.init
@@ -3,6 +3,7 @@
CONFIG_MTDC=/dev/mtd6
CONFIG_MTDB=/dev/mtdblock6
CONFIG_DIR=/var/config
+RUN_CONF_DIR=/run/config
OEM_MTDC=/dev/mtd7
OEM_MTDB=/dev/mtdblock7
@@ -60,6 +61,10 @@ mount_oem() {
case $1 in
start)
+ if ! [[ -f /run/config/device_info.json ]] ; then
+ [[ -d /run/config ]] || mkdir -m 755 -p /run/config
+ /sbin/get-eeprom-device-info -t1 # Radio might not be found yet.
+ fi
# mount config if not already mounted
if ! grep -q "^${CONFIG_MTDB} " /proc/mounts; then
mount_config
@@ -129,45 +134,45 @@ case $1 in
fi
for file in ${BTWIFIFILES}; do
- # If last character is /, make the CONFIG directory.
- if [[ ${file: -1} == / ]] ; then
- file=${file%?}
- echo directory $file operations
- if ! [[ -d ${CONFIG_DIR}/$file ]] ; then
- rm -f ${CONFIG_DIR}/$file 2>/dev/null || true
- mkdir ${CONFIG_DIR}/$file
- fi
- fi
- if [[ ! -L /etc/$file ]]; then
- echo "Creating link to ${CONFIG_DIR}/$file"
- dir=$(dirname $file)
- if [[ $dir != '.' ]] ; then
- mkdir -p "$dir"
- fi
- rm -rf old
- mkdir old
- if ! [[ -f $file ]] ; then
- # Need to preserve old files which is difficult with busybox!
- if [[ -d $file ]] || [[ -f $file ]] ; then
- cp --parents -a $file old || true
- fi
- (
- cd /etc
- if [[ -d $file ]] || [[ -f $file ]] ; then
- cp --parents -a $file ${CONFIG_DIR} || true
- fi
- )
- (
- cd old
- if [[ -d $file ]] || [[ -f $file ]] ; then
- cp --parents -a $file .. || true
+ # If last character is /, make the CONFIG directory.
+ if [[ ${file: -1} == / ]] ; then
+ file=${file%?}
+ echo directory $file operations
+ if ! [[ -d ${CONFIG_DIR}/$file ]] ; then
+ rm -f ${CONFIG_DIR}/$file 2>/dev/null || true
+ mkdir ${CONFIG_DIR}/$file
+ fi
+ fi
+ if [[ ! -L /etc/$file ]]; then
+ echo "Creating link to ${CONFIG_DIR}/$file"
+ dir=$(dirname $file)
+ if [[ $dir != '.' ]] ; then
+ mkdir -p "$dir"
fi
- )
- rm -rf old
- fi
- rm -rf /etc/$file
- ln -sf ${CONFIG_DIR}/$file /etc/$file
- fi
+ rm -rf old
+ mkdir old
+ if ! [[ -f $file ]] ; then
+ # Need to preserve old files which is difficult with busybox!
+ if [[ -d $file ]] || [[ -f $file ]] ; then
+ cp --parents -a $file old || true
+ fi
+ (
+ cd /etc
+ if [[ -d $file ]] || [[ -f $file ]] ; then
+ cp --parents -a $file ${CONFIG_DIR} || true
+ fi
+ )
+ (
+ cd old
+ if [[ -d $file ]] || [[ -f $file ]] ; then
+ cp --parents -a $file .. || true
+ fi
+ )
+ rm -rf old
+ fi
+ rm -rf /etc/$file
+ ln -sf ${CONFIG_DIR}/$file /etc/$file
+ fi
done