mirror of https://github.com/OpenIPC/firmware.git
commit
d19a55ef3d
|
@ -111,27 +111,27 @@ free_resources() {
|
||||||
}
|
}
|
||||||
|
|
||||||
self_update() {
|
self_update() {
|
||||||
if echo "${args}" | grep "rootfs" || echo "${args}" | grep "kernel" || echo "${args}" | grep -- "-n" > /dev/null 2>&1; then
|
if echo "${args}" | grep "rootfs" || echo "${args}" | grep "kernel" || echo "${args}" | grep -- "-n" > /dev/null 2>&1; then
|
||||||
echo -e "\nOffline upgrade or Overlay clean, skip sysupgrade version check."
|
echo -e "\nOffline upgrade or Overlay clean, skip sysupgrade version check."
|
||||||
else
|
else
|
||||||
echo -e "\nOnline upgrade, checking sysupgrade version..."
|
echo -e "\nOnline upgrade, checking sysupgrade version..."
|
||||||
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
||||||
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
|
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
|
||||||
if ! [ "${scr_version}" = "${dstv}" ]; then
|
if ! [ "${scr_version}" = "${dstv}" ]; then
|
||||||
echo "A new version is available, trying to update..."
|
echo "A new version is available, trying to update..."
|
||||||
chmod +x /tmp/sysupgrade
|
chmod +x /tmp/sysupgrade
|
||||||
echo -e "Done. Restarting...\n"
|
echo -e "Done. Restarting...\n"
|
||||||
exec /tmp/sysupgrade ${args}
|
exec /tmp/sysupgrade ${args}
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Ok, version match."
|
echo "Ok, version match."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
create_lock() {
|
create_lock() {
|
||||||
[ -f /tmp/sysupgrade.lock ] && echo -e "\e[1;31m\nAnother sysupgrade process is already running!\e[0m\n" && exit 1
|
[ -f /tmp/sysupgrade.lock ] && echo -e "\e[1;31m\nAnother sysupgrade process is already running!\e[0m\n" && exit 1
|
||||||
touch /tmp/sysupgrade.lock
|
touch /tmp/sysupgrade.lock
|
||||||
}
|
}
|
||||||
|
|
||||||
get_device() {
|
get_device() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
DROPBEAR_OPENIPC_VERSION = 2022.82
|
DROPBEAR_OPENIPC_VERSION = 2022.82
|
||||||
DROPBEAR_OPENIPC_SITE = https://matt.ucc.asn.au/dropbear/releases
|
DROPBEAR_OPENIPC_SITE = http://sources.buildroot.net/dropbear
|
||||||
DROPBEAR_OPENIPC_SOURCE = dropbear-$(DROPBEAR_OPENIPC_VERSION).tar.bz2
|
DROPBEAR_OPENIPC_SOURCE = dropbear-$(DROPBEAR_OPENIPC_VERSION).tar.bz2
|
||||||
DROPBEAR_OPENIPC_LICENSE = MIT, BSD-2-Clause, Public domain
|
DROPBEAR_OPENIPC_LICENSE = MIT, BSD-2-Clause, Public domain
|
||||||
DROPBEAR_OPENIPC_LICENSE_FILES = LICENSE
|
DROPBEAR_OPENIPC_LICENSE_FILES = LICENSE
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
if grep -q telemetry=true /etc/wfb.conf; then
|
||||||
echo "Starting mavlink router daemon..."
|
echo "Starting mavlink router daemon..."
|
||||||
/usr/bin/mavlink-routerd &
|
/usr/bin/mavlink-routerd &
|
||||||
|
else
|
||||||
|
echo "Telemetry service disabled in wfb.conf..."
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo "Stopping mavlink router daemon..."
|
echo "Stopping mavlink router daemon..."
|
||||||
|
|
Loading…
Reference in New Issue