init-ifupdown: disable wlan interfaces on non-wireless variants
Added a post-installation script to disable the wireless interfaces on module variants without wireless support. This fixes following messages on boot: wlan: driver load failure modprobe: can't load module wlan (extra/wlan.ko): No such device ... https://jira.digi.com/browse/DEL-3781 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
71323796fd
commit
bc8ac0507d
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 2013 Digi International.
|
# Copyright (C) 2013-2017 Digi International Inc.
|
||||||
|
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
|
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_GATEWAY##,${WLAN1_STATIC_GATEWAY},g" ${D}${sysconfdir}/network/interfaces
|
||||||
sed -i -e "s,##WLAN1_STATIC_DNS##,${WLAN1_STATIC_DNS},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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue