summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-12-04 17:12:43 +0100
committerThomas Haller <thaller@redhat.com>2013-12-04 17:14:34 +0100
commitc0e09de2b71299ea0fa54244107c24da6e8236cf (patch)
treeb2554586a8d5d6df80217fdad2f97c8e835c523e
parentb7d6c61fe7d225f70db0468f7a09253b57614a99 (diff)
downloadNetworkManager-c0e09de2b71299ea0fa54244107c24da6e8236cf.tar.gz
core: suppress logging warning when trying to create existing directory
Suppress logging the following line: <warn> Error creating directory "/var/run/NetworkManager": 17 (File exists) Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/nm-dbus-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c
index b1aa61be6d..2702faaba0 100644
--- a/src/nm-dbus-manager.c
+++ b/src/nm-dbus-manager.c
@@ -477,8 +477,10 @@ nm_dbus_manager_init (NMDBusManager *self)
#if HAVE_DBUS_GLIB_100
/* Set up our main private DBus socket */
- if (mkdir (NMRUNDIR, 0700) == -1)
- nm_log_warn (LOGD_CORE, "Error creating directory \"%s\": %d (%s)", NMRUNDIR, errno, g_strerror (errno));
+ if (mkdir (NMRUNDIR, 0700) == -1) {
+ if (errno != EEXIST)
+ nm_log_warn (LOGD_CORE, "Error creating directory \"%s\": %d (%s)", NMRUNDIR, errno, g_strerror (errno));
+ }
priv->priv_server = private_server_new (PRIV_SOCK_PATH, PRIV_SOCK_TAG, self);
if (priv->priv_server) {
priv->private_servers = g_slist_append (priv->private_servers, priv->priv_server);