From 9fe0feadbfd6186e48319c8f68187943fcf69205 Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Wed, 14 Jun 2023 09:33:48 +0200 Subject: [PATCH] delete /etc/opkg/keys on autoupdater upgrade - does trigger on autoupdate after checking that the image is correct fixes https://github.com/freifunk-gluon/gluon/issues/2665 --- .../files/usr/lib/autoupdater/upgrade.d/90delete_keys | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/90delete_keys diff --git a/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/90delete_keys b/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/90delete_keys new file mode 100755 index 0000000..ca4425f --- /dev/null +++ b/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/90delete_keys @@ -0,0 +1,9 @@ +#!/usr/bin/lua +local handle = io.popen("ls /etc/opkg/keys -1") +local files = handle:read("*a") +handle:close() + +for file in files:gmatch("[^\r\n]+") do + local filePath = "/etc/opkg/keys/" .. file + os.remove(filePath) +end \ No newline at end of file