aboutsummaryrefslogtreecommitdiff
path: root/utils/tang
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-06-09 22:20:52 -0700
committerRosen Penev <rosenp@gmail.com>2021-06-09 22:23:04 -0700
commitd49c79b76b7c7659e063290d1bc7d7fad626780a (patch)
treec6dc12fb3bbdf74dfbb7ad1f4edc4adbf22e6965 /utils/tang
parent66173efd5068d5e815c2beeb6e13f2d15acb5662 (diff)
tang: remove outdated key handling
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>
Diffstat (limited to 'utils/tang')
-rw-r--r--utils/tang/Makefile8
1 files changed, 1 insertions, 7 deletions
diff --git a/utils/tang/Makefile b/utils/tang/Makefile
index e2a1c6ba1..0e006cb05 100644
--- a/utils/tang/Makefile
+++ b/utils/tang/Makefile
@@ -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