File remove-timedated-ntp-dependency.patch of Package systemd.1408

From 2aa4c31529c2a370b560bc533fc677da27618044 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 15 Feb 2012 00:05:31 +0100
Subject: [PATCH] timedate: don't fail if NTP is not installed

https://bugzilla.redhat.com/show_bug.cgi?id=790260
---
 src/timedated.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Index: systemd-37/src/timedated.c
===================================================================
--- systemd-37.orig/src/timedated.c
+++ systemd-37/src/timedated.c
@@ -328,6 +328,14 @@ static int read_ntp(DBusConnection *bus)
 
         reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
         if (!reply) {
+
+                if (streq(error.name, "org.freedesktop.DBus.Error.FileNotFound")) {
+                        /* NTP is not installed. */
+                        use_ntp = false;
+                        r = 0;
+                        goto finish;
+                }
+
                 log_error("Failed to issue method call: %s", bus_error_message(&error));
                 r = -EIO;
                 goto finish;
openSUSE Build Service is sponsored by