From fbe65f2c719a8f68d216cb5f5cf36c4dbd97be98 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 19 Aug 2015 18:16:22 +0200 Subject: [PATCH] client: connect to Unix domain socket by default The default value of the -h option is now /var/run/chrony/chronyd.sock,127.0.0.1,::1. --- chronyc.1.in | 3 ++- client.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chronyc.1.in b/chronyc.1.in index 33d7ff8..4e3a600 100644 --- a/chronyc.1.in +++ b/chronyc.1.in @@ -24,7 +24,8 @@ A summary of the options supported by \fBchronyc\fR is included below. .TP \fB\-h\fR \fIhostname\fR -specify hostname or comma-separated list of addresses (default 127.0.0.1,::1) +specify hostname or comma-separated list of addresses +(default @CHRONYSOCKDIR@/chronyd.sock,127.0.0.1,::1) .TP \fB\-p\fR \fIport-number\fR specify port-number diff --git a/client.c b/client.c index a201bc4..55f053a 100644 --- a/client.c +++ b/client.c @@ -2920,7 +2920,7 @@ main(int argc, char **argv) DNS_SetAddressFamily(family); if (!hostnames) { - hostnames = "127.0.0.1,::1"; + hostnames = DEFAULT_COMMAND_SOCKET",127.0.0.1,::1"; #ifdef FEAT_ASYNCDNS initial_timeout /= 10; #endif