tang: remove outdated key handling 15814/head
authorRosen Penev <rosenp@gmail.com>
Thu, 10 Jun 2021 05:20:52 +0000 (22:20 -0700)
committerRosen Penev <rosenp@gmail.com>
Thu, 10 Jun 2021 05:23:04 +0000 (22:23 -0700)
As of https://github.com/latchset/tang/commit/c0f080efcd2e50 , tang has
no more tangd-update. Instead, it handles it itself. Update postinst
script.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/tang/Makefile

index e2a1c6ba17e7a25d15ab0925b46540acd137c6aa..0e006cb05be4dd312abde71627379d80f78b1034 100644 (file)
@@ -52,16 +52,10 @@ endef
 define Package/tang/postinst
 #!/bin/sh
 if [ -z "$${IPKG_INSTROOT}" ]; then
-       mkdir -p /usr/share/tang/db && mkdir -p /usr/share/tang/cache
+       mkdir -p /usr/share/tang/db
        KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l)
        if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
                /usr/libexec/tangd-keygen /usr/share/tang/db/
-       elif [ "${KEYS}" = "1" ]; then # having 1 key should not happen
-               (>&2 echo "Please check the Tang's keys in /usr/share/tang/db \
-and regenate cache using /usr/libexec/tangd-update script.")
-       else
-               /usr/libexec/tangd-update /usr/share/tang/db/ /usr/share/tang/cache/
-       fi
        (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \
                || echo -e "tangd\t\t8888/tcp" >> /etc/services
 fi