On 04/11/2015 03:28 PM, Michael Biebl wrote:
Am 11.04.2015 um 12:14 schrieb Christian Seiler:
Package: systemd
Version: 215-15
Severity: minor
Tags: patch

Dear Maintainers,

with 215-13, hwclock-save.service was added to sync the system clock
with the hardware clock on shutdown. This will fail in containers which
don't have the appropriate privileges (which is annoying, but not
really problematic, since shutdown proceeds anyway), and in privileged
containers this will needlessly sync the clock on container shutdown
(although that is probably harmless).

Please add
ConditionVirtualization=!container
to the unit file to disable the service in containers.

Makes sense.

Please consider sending a proper git formatted patch, so the change is
properly credited to you.

Attached.

Thanks,
Christian
>From 4091b5b0caa96a0f1b551665781074f41cb4bc20 Mon Sep 17 00:00:00 2001
From: Christian Seiler <christ...@iwakd.de>
Date: Sat, 11 Apr 2015 16:41:33 +0200
Subject: [PATCH] Don't run hwclock-save.service in containers.

Closes: #782377
---
 debian/extra/hwclock-save.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/extra/hwclock-save.service b/debian/extra/hwclock-save.service
index 1e0f99a..16fbade 100644
--- a/debian/extra/hwclock-save.service
+++ b/debian/extra/hwclock-save.service
@@ -5,6 +5,7 @@ Before=shutdown.target
 ConditionFileIsExecutable=!/usr/sbin/ntpd
 ConditionFileIsExecutable=!/usr/sbin/openntpd
 ConditionFileIsExecutable=!/usr/sbin/chrony
+ConditionVirtualization=!container
 
 [Service]
 Type=oneshot
-- 
2.1.4

Reply via email to