Re: [chrony-users] Checking chrony.conf for syntax errors |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Checking chrony.conf for syntax errors
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 9 Mar 2020 09:03:21 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583741007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qaN3CZiOgNCSAPb2IURQNNdVuLxyKGfPPes4IeuiOSk=; b=RYc3tA9YXxeG2U1xDcCWzCeBjp5hA7vSvXqVOGs3N4uPwRJFTfRleDxP+yNkjrv8tS1hXX IIb5ULhtODxIHcF/kovDYLf8Na9bNp8pcL3GXzMEmA4bA4OtYBjhUX7REmJ9OE4TXNmNeS RtSTpk8I4l29GwIqvKXXlZi3kSv8LqM=
On Mon, Mar 09, 2020 at 09:38:35AM +1300, Bryan Christianson wrote:
> I would like to check the chrony.conf file for syntax errors before replacing the working copy of the file
>
> I think I need to use:
> chronyd -Q -f path_to_new_file/chrony.conf
>
> I made a file with a deliberate syntax error and got
>
> bryan@number9 ~ % chronyd -Q -f path_to_new_file/chrony.conf
> 2020-03-08T20:26:58Z chronyd version DEV[3.5-171-gc3e34b8] starting (+CMDMON +NTP +REFCLOCK -RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS -NTS -SECHASH +IPV6 -DEBUG)
> 2020-03-08T20:26:58Z Fatal error : Invalid command at line 21 in file path_to_new_file/chrony.conf
> bryan@number9 ~ %
>
> Is this in general what I might expect?
There are other error messages in the parser. You can search for LOG_FATAL in
conf.c if you want to match them all.
Please note that a syntactically valid file doesn't mean chronyd will
not abort on start. There could unsupported directives, missing
refclocks, or insufficient permissions.
> If I do this while chronyd is running will it cause any problems with the running instance?
I think it could if it has the root/chrony permissions, e.g.
overwritten driftfile, new entries in log files, reconfigured
timestamping, etc.
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.