diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network index 989ae758a3..437d0d6d5d 100755 --- a/board/common/overlay/etc/init.d/S40network +++ b/board/common/overlay/etc/init.d/S40network @@ -83,6 +83,10 @@ start_wlan() { return 1 fi + if [ -n "$mtu" ]; then + ip link set mtu $mtu dev $wlan + fi + if [ -n "$static_ip" ]; then msg_done $static_ip ifconfig $wlan $static_ip up @@ -125,7 +129,7 @@ start_eth() { fi done - # wait up to link_nego_timeout seconds for link + # wait up to $link_nego_timeout seconds for link count=0 while [ "$(cat /sys/class/net/$eth/carrier 2>&1)" != "1" ]; do sleep 1 @@ -135,6 +139,10 @@ start_eth() { return 1 fi done + + if [ -n "$mtu" ]; then + ip link set mtu $mtu dev $eth + fi if [ -n "$static_ip" ]; then msg_done $static_ip diff --git a/board/raspberrypi/overlay/usr/bin/motion b/board/raspberrypi/overlay/usr/bin/motion deleted file mode 100755 index 1244c595cc..0000000000 --- a/board/raspberrypi/overlay/usr/bin/motion +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -MOTION_SVN="/usr/bin/motion-svn" -MOTION_MRDAVE="/usr/bin/motion-mrdave" -MOTION_MMAL="/usr/bin/motion-mmal" - -if [ "$1" == "-h" ]; then - # when asked about version, always report MrDave's, - # as it's the most featureful one - motion=$MOTION_MRDAVE - -else - conf_count=$(ls -1 /data/etc/thread-*.conf 2>/dev/null | wc -l) - - if [ "$conf_count" -eq 0 ]; then # no cameras - motion=$MOTION_MRDAVE - - elif [ "$conf_count" -eq 1 ]; then # one camera - if cat /data/etc/thread-*.conf | grep -E '^videodevice' &>/dev/null && - lsmod | grep bcm2835_v4l2 &>/dev/null; then # RPI CSI camera module - - motion=$MOTION_MMAL - else - motion=$MOTION_MRDAVE - - fi - - else # two or more cameras - motion=$MOTION_MRDAVE - fi -fi - -echo "using motion binary $motion" - -exec $motion "$@" - diff --git a/board/raspberrypi2/overlay/usr/bin/motion b/board/raspberrypi2/overlay/usr/bin/motion deleted file mode 100755 index 1244c595cc..0000000000 --- a/board/raspberrypi2/overlay/usr/bin/motion +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -MOTION_SVN="/usr/bin/motion-svn" -MOTION_MRDAVE="/usr/bin/motion-mrdave" -MOTION_MMAL="/usr/bin/motion-mmal" - -if [ "$1" == "-h" ]; then - # when asked about version, always report MrDave's, - # as it's the most featureful one - motion=$MOTION_MRDAVE - -else - conf_count=$(ls -1 /data/etc/thread-*.conf 2>/dev/null | wc -l) - - if [ "$conf_count" -eq 0 ]; then # no cameras - motion=$MOTION_MRDAVE - - elif [ "$conf_count" -eq 1 ]; then # one camera - if cat /data/etc/thread-*.conf | grep -E '^videodevice' &>/dev/null && - lsmod | grep bcm2835_v4l2 &>/dev/null; then # RPI CSI camera module - - motion=$MOTION_MMAL - else - motion=$MOTION_MRDAVE - - fi - - else # two or more cameras - motion=$MOTION_MRDAVE - fi -fi - -echo "using motion binary $motion" - -exec $motion "$@" - diff --git a/board/raspberrypi3/overlay/usr/bin/motion b/board/raspberrypi3/overlay/usr/bin/motion deleted file mode 100755 index 1244c595cc..0000000000 --- a/board/raspberrypi3/overlay/usr/bin/motion +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -MOTION_SVN="/usr/bin/motion-svn" -MOTION_MRDAVE="/usr/bin/motion-mrdave" -MOTION_MMAL="/usr/bin/motion-mmal" - -if [ "$1" == "-h" ]; then - # when asked about version, always report MrDave's, - # as it's the most featureful one - motion=$MOTION_MRDAVE - -else - conf_count=$(ls -1 /data/etc/thread-*.conf 2>/dev/null | wc -l) - - if [ "$conf_count" -eq 0 ]; then # no cameras - motion=$MOTION_MRDAVE - - elif [ "$conf_count" -eq 1 ]; then # one camera - if cat /data/etc/thread-*.conf | grep -E '^videodevice' &>/dev/null && - lsmod | grep bcm2835_v4l2 &>/dev/null; then # RPI CSI camera module - - motion=$MOTION_MMAL - else - motion=$MOTION_MRDAVE - - fi - - else # two or more cameras - motion=$MOTION_MRDAVE - fi -fi - -echo "using motion binary $motion" - -exec $motion "$@" -