networkd.c revision 505f8da7325591defe5f751f328bd26915267602
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen This file is part of systemd.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen Copyright 2013 Tom Gundersen <teg@jklm.no>
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen systemd is free software; you can redistribute it and/or modify it
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen under the terms of the GNU Lesser General Public License as published by
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen the Free Software Foundation; either version 2.1 of the License, or
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen (at your option) any later version.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen systemd is distributed in the hope that it will be useful, but
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen WITHOUT ANY WARRANTY; without even the implied warranty of
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen Lesser General Public License for more details.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen You should have received a copy of the GNU Lesser General Public License
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen log_error("This program takes no arguments.");
fe8db0c5ee3365a2fc80ee7ebffa238f9a0a2ae2Tom Gundersen /* Always create the directories people can create inotify
fe8db0c5ee3365a2fc80ee7ebffa238f9a0a2ae2Tom Gundersen * watches in. */
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen r = mkdir_label("/run/systemd/network", 0755);
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen log_error("Could not create runtime directory: %s",
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen r = mkdir_label("/run/systemd/network/links", 0755);
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen log_error("Could not create runtime directory 'links': %s",
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen r = mkdir_label("/run/systemd/network/leases", 0755);
0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cfTom Gundersen log_error("Could not create runtime directory 'leases': %s",
1f6d9bc9ee894d4023b7eacea1754986f25bce57Tom Gundersen log_error("Could not create manager: %s", strerror(-r));
f0c4cd7a2c2835a392b5b1807d8c506ab0af44deTom Gundersen log_error("Could not connect to udev: %s", strerror(-r));
f0c4cd7a2c2835a392b5b1807d8c506ab0af44deTom Gundersen log_error("Could not connect to rtnl: %s", strerror(-r));
f0c4cd7a2c2835a392b5b1807d8c506ab0af44deTom Gundersen log_error("Could not connect to system bus: %s", strerror(-r));
f0c4cd7a2c2835a392b5b1807d8c506ab0af44deTom Gundersen log_error("Could not load configuration files: %s", strerror(-r));
f0c4cd7a2c2835a392b5b1807d8c506ab0af44deTom Gundersen log_error("Could not enumerate links: %s", strerror(-r));
3bef724f7e7f7eaca69881548b06e221b77d7031Tom Gundersen /* write out empty resolv.conf to avoid a
3bef724f7e7f7eaca69881548b06e221b77d7031Tom Gundersen * dangling symlink */
1f6d9bc9ee894d4023b7eacea1754986f25bce57Tom Gundersen log_error("Could not create resolv.conf: %s", strerror(-r));
4b6141c42497dc199618f95fa3f359615eecfaa0Tom Gundersen "STATUS=Processing requests...");
1f6d9bc9ee894d4023b7eacea1754986f25bce57Tom Gundersen log_error("Event loop failed: %s", strerror(-r));
4b6141c42497dc199618f95fa3f359615eecfaa0Tom Gundersen "STATUS=Shutting down...");