DESCRIPTION = "Configuration files for NetworkManager" LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" RDEPENDS_${PN} = "networkmanager" PACKAGECONFIG ?= "" export DEFAULT_ETH ??= "eth0" PACKAGECONFIG[unmanaged-devices] = "" PACKAGECONFIG[ethernet-dhcp] = "" SRC_URI = " \ file://eth0-static \ file://eth0-dhcp \ file://bridge-slave-eth0.nmconnection \ file://bridge-slave-umnet0.nmconnection \ file://NetworkManager.conf \ file://00-fallback-dns.conf \ file://unmanaged-devices.conf \ " SRC_URI_append_am335x-nrhw20 = " \ file://system-connections-static.tar.gz \ file://system-connections-dhcp.tar.gz \ " PACKAGE_ARCH = "${MACHINE_ARCH}" do_install () { install -d ${D}${sysconfdir}/NetworkManager/dnsmasq.d install -d ${D}${sysconfdir}/NetworkManager/system-connections install -m 0644 ${WORKDIR}/NetworkManager.conf ${D}${sysconfdir}/NetworkManager/ install -m 0644 ${WORKDIR}/00-fallback-dns.conf ${D}${sysconfdir}/NetworkManager/dnsmasq.d/ if ${@bb.utils.contains('PACKAGECONFIG','ethernet-dhcp','true','false',d)}; then install -m 0600 ${WORKDIR}/eth0-dhcp ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection else install -m 0600 ${WORKDIR}/eth0-static ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection fi # If the distro supports the user module we must bridge eth0 and umnet0 # and configure br0 instead of eth0 if ${@bb.utils.contains('COMBINED_FEATURES','user-module','true','false',d)}; then DEFAULT_ETH="br0" install -m 0600 ${WORKDIR}/bridge-slave-eth0.nmconnection ${D}${sysconfdir}/NetworkManager/system-connections/ install -m 0600 ${WORKDIR}/bridge-slave-umnet0.nmconnection ${D}${sysconfdir}/NetworkManager/system-connections/ # Change type of main connection to bridge sed -i "s/type=.*/type=bridge/g" ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection printf "\n[bridge]\nstp=false\n" >> ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection fi # Handle HWs with different default interface if [ "$DEFAULT_ETH" != "eth0" ]; then # Replace interface name sed -i "s/eth0/$DEFAULT_ETH/g" ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection mv ${D}${sysconfdir}/NetworkManager/system-connections/eth0.nmconnection \ ${D}${sysconfdir}/NetworkManager/system-connections/$DEFAULT_ETH.nmconnection fi if ${@bb.utils.contains('PACKAGECONFIG','unmanaged-devices','true','false',d)}; then install -d ${D}${sysconfdir}/NetworkManager/conf.d install -m 0644 ${WORKDIR}/unmanaged-devices.conf ${D}${sysconfdir}/NetworkManager/conf.d/ fi } do_install_append_am335x-nrhw20() { rm -rf ${D}${sysconfdir}/NetworkManager/system-connections/* if ${@bb.utils.contains('PACKAGECONFIG','ethernet-dhcp','true','false',d)}; then install -m 0600 ${WORKDIR}/system-connections-dhcp/* ${D}${sysconfdir}/NetworkManager/system-connections/ else install -m 0600 ${WORKDIR}/system-connections-static/* ${D}${sysconfdir}/NetworkManager/system-connections/ fi } FILES_${PN} = " \ ${sysconfdir}/NetworkManager/NetworkManager.conf \ ${sysconfdir}/NetworkManager/dnsmasq.d \ ${sysconfdir}/NetworkManager/system-connections \ ${sysconfdir}/NetworkManager/conf.d \ "