From 13ac2fde6209e90a935e24c75eff2a527ff40e0f Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 6 Oct 2026 07:55:42 +0200 Subject: [PATCH] ripe-atlas: fit get_key to the installed variant With only ripe-atlas-common installed, get_key told users to start the probe to create the key, but the init creates it only once ripe-atlas-probe or ripe-atlas-anchor is installed. For an anchor, it pointed to the registration form of software probes. Say which package is missing, and point an anchor to the anchor application. Fixes: 21b1fefb4172 ("ripe-atlas: add get_key and probeid to init script") Signed-off-by: Josef Schlehofer --- net/ripe-atlas/files/ripe-atlas.init | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/ripe-atlas/files/ripe-atlas.init b/net/ripe-atlas/files/ripe-atlas.init index d055a801cc..ebacc86005 100644 --- a/net/ripe-atlas/files/ripe-atlas.init +++ b/net/ripe-atlas/files/ripe-atlas.init @@ -256,8 +256,14 @@ registered_id() get_key() { local pub=/etc/ripe-atlas/probe_key.pub + local variant local id + variant="$(cat /usr/share/ripe-atlas/variant 2> /dev/null)" + if [ -z "${variant}" ]; then + echo 'Install ripe-atlas-probe or ripe-atlas-anchor first' >&2 + return 1 + fi if [ ! -s "${pub}" ]; then echo "${pub} is missing, start the probe to create it" >&2 return 1 @@ -265,6 +271,8 @@ get_key() id="$(registered_id)" if [ -n "${id}" ]; then echo "Registered as probe ${id} with:" + elif [ "${variant}" = anchor ]; then + echo 'Register the anchor at https://atlas.ripe.net/anchors/apply/ with:' else echo 'Register the probe at https://atlas.ripe.net/apply/swprobe/ with:' fi