chiark / gitweb /
shutdown: don't try to shut down DM devices in a container
[elogind.git] / src / timedate / timedated.c
index 792c61a7d78ac3e7b8aaa9776f7f6b4f86aaf792..4fbee7ccbdb12e21a59a459c4ab0c3d607b4c216 100644 (file)
@@ -6,16 +6,16 @@
   Copyright 2011 Lennart Poettering
 
   systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
   systemd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
+  Lesser General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
+  You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
@@ -334,6 +334,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. */
+                        tz.use_ntp = false;
+                        r = 0;
+                        goto finish;
+                }
+
                 log_error("Failed to issue method call: %s", bus_error_message(&error));
                 r = -EIO;
                 goto finish;