Don’t create it into /var/lib. Instead, create it somewhere in /etc.

If for some reason you don’t want to modify your daemon, then create a link 
from /var/lib to a persistent location in /etc before you launch your daemon in 
your init.d script.

 

From: openwrt-devel [mailto:[email protected]] On Behalf 
Of Antonio Gómez Soto
Sent: Friday, February 06, 2015 7:27 AM
To: [email protected]
Subject: [OpenWrt-Devel] Porting package, need permanent storage

 

Hi,

 

I am porting a software package to openwrt. It's a daemon which runs in the 
background.

Problem is, this daemon spontaneously creates a file in /var/lib. It's a one 
line ascii

file, but it needs to be preserved across reboots.

 

How do I accomplish that? I know about UCI, but I think that populates nvram

on service restart, and I can't have that. This daemon runs, and just suddenly

creates that file, and it needs to stay there forever.

 

Thanks for any pointers,

Antonio

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to