raspberrypi: always use motion-mrdave by default

This commit is contained in:
Calin Crisan 2016-06-05 14:34:09 +03:00
parent 56d7653353
commit 311c9bdb88
4 changed files with 9 additions and 109 deletions

View File

@ -83,6 +83,10 @@ start_wlan() {
return 1 return 1
fi fi
if [ -n "$mtu" ]; then
ip link set mtu $mtu dev $wlan
fi
if [ -n "$static_ip" ]; then if [ -n "$static_ip" ]; then
msg_done $static_ip msg_done $static_ip
ifconfig $wlan $static_ip up ifconfig $wlan $static_ip up
@ -125,7 +129,7 @@ start_eth() {
fi fi
done done
# wait up to link_nego_timeout seconds for link # wait up to $link_nego_timeout seconds for link
count=0 count=0
while [ "$(cat /sys/class/net/$eth/carrier 2>&1)" != "1" ]; do while [ "$(cat /sys/class/net/$eth/carrier 2>&1)" != "1" ]; do
sleep 1 sleep 1
@ -135,6 +139,10 @@ start_eth() {
return 1 return 1
fi fi
done done
if [ -n "$mtu" ]; then
ip link set mtu $mtu dev $eth
fi
if [ -n "$static_ip" ]; then if [ -n "$static_ip" ]; then
msg_done $static_ip msg_done $static_ip

View File

@ -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 "$@"

View File

@ -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 "$@"

View File

@ -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 "$@"