Skip to content

Commit

Permalink
chore: 8.0.0->main after code freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Sep 19, 2024
2 parents 2ad1ac9 + 8d17137 commit 8eba8b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env sh

# Detect when the wifi interface was downed because the driver crashed and reload it

test "$NM_DISPATCHER_ACTION" = "down" || exit 0
test "$DEVICE_IFACE" = "mlan0" || exit 0

nmcli dev show mlan0 && exit 0
echo 'Detected mlan0 crash, unbinding/rebinding'

echo 30b60000.mmc > /sys/bus/platform/drivers/sdhci-esdhc-imx/unbind
sleep 1
echo 30b60000.mmc > /sys/bus/platform/drivers/sdhci-esdhc-imx/bind
sleep 1

echo 'Restarting NetworkManager after mlan0 crash'
systemctl restart NetworkManager
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ SRC_URI += "file://system-connections-location.conf \
file://wired-linklocal.nmconnection \
file://wired.nmconnection \
file://opentrons-init-systemconnections.service\
file://dispatch-bounce-mlan0.sh \
"

FILES:${PN} += "/etc/NetworkManager/conf.d/system-connections-location.conf \
/etc/NetworkManager/conf.d/disable-uap0.conf \
${systemd_system_unitdir}/opentrons-init-systemconnections.service \
/usr/share/default-connections/wired-linklocal.nmconnection \
/usr/share/default-connections/wired.nmconnection \
/etc/NetworkManager/dispatcher.d/bounce-mlan0.sh \
"

do_install:append() {
Expand All @@ -25,7 +27,8 @@ do_install:append() {
install -m 600 ${WORKDIR}/wired.nmconnection ${D}/usr/share/default-connections/wired.nmconnection
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/opentrons-init-systemconnections.service ${D}${systemd_system_unitdir}/opentrons-init-systemconnections.service

install -d ${D}/etc/NetworkManager/dispatcher.d
install -m 744 ${WORKDIR}/dispatch-bounce-mlan0.sh ${D}/etc/NetworkManager/dispatcher.d/bounce-mlan0.sh
}

SYSTEMD_AUTO_ENABLE = "enable"
Expand Down

0 comments on commit 8eba8b0

Please sign in to comment.