Merge branch 'thingos'

This commit is contained in:
Calin Crisan 2017-07-06 21:42:44 +03:00
commit 8a16cc03a7
15 changed files with 8 additions and 19 deletions

Binary file not shown.

View File

@ -45,7 +45,6 @@ case "$1" in
msg_begin "Creating required data files"
mkdir /data/etc
mkdir /data/log
mkdir -m 775 /data/output
mkdir -m 775 /data/media
cp /etc/version /data/etc/version
ln -s /usr/share/zoneinfo/UTC /data/etc/localtime

View File

@ -7,7 +7,9 @@ netwatch_interval=20
test -f $watch_conf && source $watch_conf || exit 0
test -z "$netwatch_host" || -z "$netwatch_port" && exit 0
if [ -z "$netwatch_host" ] || [ -z "$netwatch_port" ]; then
exit 0
fi
test -n "$os_version" || source /etc/init.d/base
test -n "$os_debug" || source /etc/init.d/conf
@ -18,10 +20,12 @@ watch() {
count=0
netwatch_retries=$(($netwatch_retries - 1))
while true; do
sleep $netwatch_interval
if nc -z -w $netwatch_timeout $netwatch_host $netwatch_port </dev/null >/dev/null 2>&1; then
count=0
else
if [ $count -lt $netwatch_retries ]; then
logger -t netwatch -s "cannot connect to $netwatch_host:$netwatch_port"
count=$(($count + 1))
continue
else
@ -29,7 +33,6 @@ watch() {
reboot
fi
fi
sleep $netwatch_interval
done
}

View File

@ -330,7 +330,7 @@ function do_upgrade() {
set -e
do_download "$2"
do_download "$1"
show_status
do_extract

View File

@ -1,13 +0,0 @@
#!/bin/bash
# more settings have been added to [/data]/etc/os.conf
echo 'os_networkless="false"' >> /data/etc/os.conf
echo 'os_eth="eth0"' >> /data/etc/os.conf
echo 'os_wlan="wlan0"' >> /data/etc/os.conf
echo 'os_ppp="ppp0"' >> /data/etc/os.conf
# boolean values in watch.conf have been normalized to "true" and "false"
sed -i 's/=no/="false"/' /data/etc/watch.conf
sed -i 's/=yes/="true"/' /data/etc/watch.conf

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
#!/bin/bash
sed 's/#initrd_filename=.*/initrd_filename=fwupdater.img/' uEnv.txt
sed -r -i 's/#initrd_filename=.*/initrd_filename=fwupdater.img/' /boot/uEnv.txt

View File

@ -6,5 +6,5 @@ mkdir -p $BOOT_DIR/pine64
cp $IMG_DIR/Image $BOOT_DIR/kernel.img
cp $BOARD_DIR/uEnv.txt $BOOT_DIR
cp $BOARD_DIR/dtb/* $BOOT_DIR/pine64
cp $BOARD_DIR/initrd.img $BOOT_DIR
cp $BOARD_DIR/fwupdater.img $BOOT_DIR

Binary file not shown.

Binary file not shown.

Binary file not shown.