Package: chrony
Version: 1.30-1
Severity: normal
Tags: patch

I finally tracked down where that weekly "Unrecognized command" email
was coming from.  :)

Attaching patch for the trivial fix.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.16-2-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages chrony depends on:
ii  install-info  5.2.0.dfsg.1-4
ii  libc6         2.19-11
ii  libedit2      3.1-20140620-2
ii  libtomcrypt0  1.17-6
ii  lsb-base      4.1+Debian13
ii  net-tools     1.60-26
ii  timelimit     1.8-1
ii  ucf           3.0030

Versions of packages chrony recommends:
ii  udev  215-5+b1

chrony suggests no packages.

-- Configuration Files:
/etc/cron.weekly/chrony [Errno 2] No such file or directory: 
u'/etc/cron.weekly/chrony'
/etc/logrotate.d/chrony changed [not included]

-- no debconf information
>From 58bab7e2f213300e1a5a51807f4fbbd1cf8a9cf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <[email protected]>
Date: Tue, 30 Sep 2014 15:42:38 -0400
Subject: [PATCH] Strip leading <tab>s from the here-document in logrotate
 config

A here-document delimiter cannot normally have leading spaces; the shell
will consider the "EOF" line to be part of the input, and feed it to
chronyc (resulting in an "Unrecognized command" error).
---
 debian/logrotate | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/logrotate b/debian/logrotate
index 68f4518..aac3492 100644
--- a/debian/logrotate
+++ b/debian/logrotate
@@ -9,7 +9,7 @@
 	create 644
 	postrotate
 		PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`
-		cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
+		cat <<- EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
 		password $PASSWORD
 		cyclelogs
 		EOF
-- 
2.1.1

Reply via email to