diff --git a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend index 38e5d2f17..99a1c3890 100644 --- a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend +++ b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Digi International. +# Copyright (C) 2013-2017 Digi International Inc. FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" @@ -138,3 +138,21 @@ do_install_append_ccimx6ul() { sed -i -e "s,##WLAN1_STATIC_GATEWAY##,${WLAN1_STATIC_GATEWAY},g" ${D}${sysconfdir}/network/interfaces sed -i -e "s,##WLAN1_STATIC_DNS##,${WLAN1_STATIC_DNS},g" ${D}${sysconfdir}/network/interfaces } + +# Disable wireless interfaces on first boot for non-wireless variants +pkg_postinst_${PN}() { + if [ -n "$D" ]; then + exit 1 + fi + + if [ ! -d "/proc/device-tree/wireless" ]; then + sed -i -e '/^auto wlan/{s,^,#,g};/^auto p2p/{s,^,#,g}' /etc/network/interfaces + fi + + # Create the symlinks in the different runlevels + if type update-rc.d >/dev/null 2>/dev/null; then + update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} + fi + + exit 0 +}