Re: replace etc/network/interfaces with symbolic link


Bryan Evenson
 

Aurele,

One possible issue is ${sysconfdir}/network/interfaces is listed in the CONFFILES in the original recipe. It may still be installing this file because it is listed under CONFFILES. Try adding:

CONFFILES_${PN} = ""

To your bbappend.

Regards,
Bryan

-----Original Message-----
From: yocto-bounces@... [mailto:yocto-
bounces@...] On Behalf Of Aurele Traynard
Sent: Friday, February 06, 2015 10:55 AM
To: yocto@...
Subject: [yocto] replace etc/network/interfaces with symbolic link

Hi,


I'm trying to find a clean way to replace /etc/network/interfaces with a
symbolic link. (it comes with init-ifupdown recipe) I tried with a bbappend
but nothing appear in final filesystem and /etc/network/interfaces still
exists...


I'm sure the following code is completely wrong, but I don't know how to do
this with the right way...
do_install_append () {
mkdir -p datas/network

install -d 0755 ${D}/datas
install -d 0755 ${D}/datas/network
install -m 0755 ${D}${sysconfdir}/network/interfaces ${D}/datas/network
#mv ${D}${sysconfdir}/network/interfaces ${D}/datas/network
rm ${D}${sysconfdir}/network/interfaces
ln -sf /datas/network/interfaces ${D}${sysconfdir}/network/interfaces

}
FILES_${PN} += "/datas/ /datas/network/interfaces"


thanks for any help

Join yocto@lists.yoctoproject.org to automatically receive all group messages.