From ecb1d9b3f36a42415f089d118e83cedc802dde4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sun, 4 Jun 2017 14:33:47 +0000 Subject: [PATCH] Better fallback for FQDN detection --- certidude/const.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/certidude/const.py b/certidude/const.py index b9d6961..13b24af 100644 --- a/certidude/const.py +++ b/certidude/const.py @@ -20,8 +20,7 @@ STORAGE_PATH = "/var/lib/certidude/" try: FQDN = socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, 0, socket.AI_CANONNAME)[0][3] except socket.gaierror: - click.echo("Failed to resolve fully qualified hostname of this machine, make sure hostname -f works") - sys.exit(254) + FQDN = socket.gethostname() try: HOSTNAME, DOMAIN = FQDN.split(".", 1)