Skip to content

Commit 7d4e97c

Browse files
committed
Add lepotato usage statistics
1 parent 2a3807b commit 7d4e97c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
LEPOTATO_SERIAL=/sys/bus/platform/drivers/meson-sm/firmware:secure-monitor/serial
3+
until $(curl --output /dev/null --silent --head --fail USAGE_STATISTICS_URL/boot?id=`cat "${LEPOTATO_SERIAL}" | grep -i '^Serial' | awk '{ print $3 }' | sha1sum | awk '{ print $1 }' `'&version='`cat USAGE_STATISTICS_VERSION_FILE | head -n 1`'&variant='`cat /etc/dist_variant | head -n 1` ); do
4+
echo "$(date): try to connect and report boot"
5+
sleep 5
6+
done

src/modules/usage-statistics/start_chroot_script

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ apt-get update --allow-releaseinfo-change
1313
apt-get -y install curl
1414

1515
unpack /filesystem/root /
16+
if [ "${BASE_BOARD}" == "debian_lepotato" ]; then
17+
unpack /filesystem/root_lepotato /
18+
fi
1619

1720
# Set hotspot name and password
1821
sed -i s"@USAGE_STATISTICS_URL@$USAGE_STATISTICS_URL@g" /usr/bin/boot_report

0 commit comments

Comments
 (0)