replace etc/network/interfaces with symbolic link


Aurele Traynard <aurele.traynard@...>
 

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.