mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
Merge branch 'thingos' into dev
This commit is contained in:
commit
000c9a7231
@ -15,7 +15,10 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# set root and admin passwords
|
# set root and admin passwords
|
||||||
password=$(/etc/init.d/adminpw)
|
password=""
|
||||||
|
if [ -x /etc/init.d/adminpw ]; then
|
||||||
|
password=$(/etc/init.d/adminpw)
|
||||||
|
fi
|
||||||
msg_begin "Setting root password"
|
msg_begin "Setting root password"
|
||||||
|
|
||||||
rm -f /data/etc/shadow+
|
rm -f /data/etc/shadow+
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -f /data/etc/motion.conf ]; then
|
# echo your admin password here
|
||||||
cat /data/etc/motion.conf | grep admin_password | grep -v _hash | cut -d ' ' -f 3-
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ function exit_usage() {
|
|||||||
echo " fwupdate flashboot (flashes the boot partition from extracted image)"
|
echo " fwupdate flashboot (flashes the boot partition from extracted image)"
|
||||||
echo " fwupdate flashreboot (prepares for reboot + root partititon flash)"
|
echo " fwupdate flashreboot (prepares for reboot + root partititon flash)"
|
||||||
echo " fwupdate status (shows the current firmware updating status; see below)"
|
echo " fwupdate status (shows the current firmware updating status; see below)"
|
||||||
|
echo " fwupdate upgrade <version|url> (performs all the operations necessary for upgrading)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Statuses:"
|
echo "Statuses:"
|
||||||
echo " idle"
|
echo " idle"
|
||||||
@ -321,6 +322,27 @@ function show_status() {
|
|||||||
echo "idle"
|
echo "idle"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#### upgrade ####
|
||||||
|
|
||||||
|
function do_upgrade() {
|
||||||
|
echo "upgrading to $1"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
do_download "$2"
|
||||||
|
show_status
|
||||||
|
|
||||||
|
do_extract
|
||||||
|
show_status
|
||||||
|
|
||||||
|
flash_boot
|
||||||
|
show_status
|
||||||
|
|
||||||
|
flash_reboot
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function new_version() {
|
function new_version() {
|
||||||
cat $FW_DIR/$VER_FILE
|
cat $FW_DIR/$VER_FILE
|
||||||
}
|
}
|
||||||
@ -340,7 +362,7 @@ case "$1" in
|
|||||||
exit_usage
|
exit_usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_download $2
|
do_download "$2"
|
||||||
show_status
|
show_status
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -362,6 +384,14 @@ case "$1" in
|
|||||||
show_status
|
show_status
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
upgrade)
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
exit_usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
do_upgrade "$2"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
exit_usage
|
exit_usage
|
||||||
;;
|
;;
|
||||||
|
20
board/common/overlay/usr/bin/gpio.sh
Executable file
20
board/common/overlay/usr/bin/gpio.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
GPIO=$1
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $0 <gpio> [0|1]" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
test -z "$GPIO" && usage
|
||||||
|
test -e /sys/class/gpio/gpio$GPIO || echo $GPIO > /sys/class/gpio/export
|
||||||
|
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
echo out > /sys/class/gpio/gpio$GPIO/direction
|
||||||
|
echo $2 > /sys/class/gpio/gpio$GPIO/value
|
||||||
|
else
|
||||||
|
echo in > /sys/class/gpio/gpio$GPIO/direction
|
||||||
|
cat /sys/class/gpio/gpio$GPIO/value
|
||||||
|
fi
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user