Patchwork [V3,8/9] irda-utils: fix for read-only rootfs

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 31, 2013, 2:09 a.m.
Message ID <d2a5b938c55374b5002326c34f6d8097e6130c95.1375236274.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/54823/
State Accepted
Commit 0b66192825633d4d7e635cd9a97a3c0da39fc765
Headers show

Comments

Qi.Chen@windriver.com - July 31, 2013, 2:09 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

The init script for irda writes configuration items to /etc/sysconfig/irda
if that file is not available in system. But it's actually not necessary,
the behavior doesn't change whether the init script writes to the file or not.

Considering it issues error messages in case of a read-only rootfs, I delete
the writing process.

[YOCTO #4103]
[YOCTO #4886]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../irda-utils/irda-utils-0.9.18/init              |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

Patch

diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init
index 63750f1..14efb94 100755
--- a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init
+++ b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init
@@ -13,7 +13,6 @@  module_id() {
 }
 
 if [ ! -f /etc/sysconfig/irda ]; then
-
     case `module_id` in
 	"HP iPAQ H2200" | "HP iPAQ HX4700" | "HTC Universal")
 	    IRDA=yes
@@ -28,18 +27,10 @@  if [ ! -f /etc/sysconfig/irda ]; then
 	    DISCOVERY=
 	    ;;
     esac
-
-    mkdir -p /etc/sysconfig
-    echo "IRDA=$IRDA" > /etc/sysconfig/irda
-    if [ $IRDA = "yes" ]; then
-	echo "DEVICE=$DEVICE" >> /etc/sysconfig/irda
-	echo "DONGLE=$DONGLE" >> /etc/sysconfig/irda
-	echo "DISCOVERY=$DISCOVERY" >> /etc/sysconfig/irda
-    fi
+else
+    . /etc/sysconfig/irda
 fi
 
-. /etc/sysconfig/irda
-
 # Check that irda is up.
 [ ${IRDA} = "no" ] && exit 0