mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
raspberrypi: always use motion-mrdave by default
This commit is contained in:
parent
56d7653353
commit
311c9bdb88
@ -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
|
||||
|
@ -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 "$@"
|
||||
|
@ -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 "$@"
|
||||
|
@ -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 "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user