Patchwork [V2,08/10] irda-utils: make /etc/sysconfig writable in read-only rootfs

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 29, 2013, 2:33 a.m.
Message ID <c73f95c035bb32208d7da8be11a50b15f4611174.1375065009.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/54647/
State New
Headers show

Comments

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

This diretory needs to be writable, the following error will appear
at system start-up.

   /etc/rc5.d/S20irattach: /etc/sysconfig/irda: Read-only file system

[YOCTO #4103]
[YOCTO #4886]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../irda-utils/irda-utils_0.9.18.bb                |    4 ++++
 1 file changed, 4 insertions(+)
Phil Blundell - July 29, 2013, 3:26 p.m.
On Mon, 2013-07-29 at 10:33 +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> This diretory needs to be writable, the following error will appear
> at system start-up.
> 
>    /etc/rc5.d/S20irattach: /etc/sysconfig/irda: Read-only file system

The whole chunk of code in that script that's trying to write
to /etc/sysconfig seems bogus.  I think the right fix is just to delete
it rather than trying to provide a a volatile implementation
of /etc/sysconfig (which seems like a contradiction in terms).

p.
Qi.Chen@windriver.com - July 30, 2013, 5:48 a.m.
On 07/29/2013 11:26 PM, Phil Blundell wrote:
> On Mon, 2013-07-29 at 10:33 +0800, Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> This diretory needs to be writable, the following error will appear
>> at system start-up.
>>
>>     /etc/rc5.d/S20irattach: /etc/sysconfig/irda: Read-only file system
> The whole chunk of code in that script that's trying to write
> to /etc/sysconfig seems bogus.  I think the right fix is just to delete
> it rather than trying to provide a a volatile implementation
> of /etc/sysconfig (which seems like a contradiction in terms).
>
> p.
>
>

After a second look at the script, I think you're right.
Thank your for pointing it out :)
I'll fix this in my V3 patchset.

Best Regards,
Chen Qi

>

Patch

diff --git a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
index 575b0b1..4c8723e 100644
--- a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
+++ b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
@@ -37,4 +37,8 @@  do_install () {
 
 	install -d ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+
+	# Create config files for read-only rootfs
+	install -d ${D}${sysconfdir}/default/readonly
+	echo "/etc/sysconfig /var/volatile/etc/sysconfig" > ${D}${sysconfdir}/default/readonly/irda-utils
 }