[systemd-commits] src/bridge.c src/shutdownd.c src/tmpfiles.c src/user-sessions.c

Kay Sievers kay at kemper.freedesktop.org
Mon Apr 4 06:34:33 PDT 2011


 src/bridge.c        |    2 +-
 src/shutdownd.c     |    8 ++++----
 src/tmpfiles.c      |    5 ++---
 src/user-sessions.c |    8 ++++----
 4 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit db019b8dd206844dcf5fde661256dc71fcc06fef
Author: Kay Sievers <kay.sievers at vrfy.org>
Date:   Mon Apr 4 15:33:00 2011 +0200

    change remaining /var/run to /run

diff --git a/src/bridge.c b/src/bridge.c
index 5ee058a..878856c 100644
--- a/src/bridge.c
+++ b/src/bridge.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[]) {
 
         zero(sa);
         sa.un.sun_family = AF_UNIX;
-        strncpy(sa.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(sa.un.sun_path));
+        strncpy(sa.un.sun_path, "/run/dbus/system_bus_socket", sizeof(sa.un.sun_path));
 
         if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
                 log_error("Failed to connect: %m");
diff --git a/src/shutdownd.c b/src/shutdownd.c
index 6b92cee..8f765b4 100644
--- a/src/shutdownd.c
+++ b/src/shutdownd.c
@@ -318,10 +318,10 @@ int main(int argc, char *argv[]) {
                 if (pollfd[FD_NOLOGIN_TIMER].revents) {
                         int e;
 
-                        log_info("Creating /var/run/nologin, blocking further logins...");
+                        log_info("Creating /run/nologin, blocking further logins...");
 
-                        if ((e = write_one_line_file("/var/run/nologin", "System is going down.")) < 0)
-                                log_error("Failed to create /var/run/nologin: %s", strerror(-e));
+                        if ((e = write_one_line_file("/run/nologin", "System is going down.")) < 0)
+                                log_error("Failed to create /run/nologin: %s", strerror(-e));
                         else
                                 unlink_nologin = true;
 
@@ -346,7 +346,7 @@ finish:
                         close_nointr_nofail(pollfd[i].fd);
 
         if (unlink_nologin)
-                unlink("/var/run/nologin");
+                unlink("/run/nologin");
 
         if (exec_shutdown) {
                 char sw[3];
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 70a9ebd..b21df95 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -47,9 +47,8 @@
 
 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
  * them in the file system. This is intended to be used to create
- * properly owned directories beneath /tmp, /var/tmp, /run and
- * /var/lock which are volatile and hence need to be recreated on
- * bootup. */
+ * properly owned directories beneath /tmp, /var/tmp, /run, which are
+ * volatile and hence need to be recreated on bootup. */
 
 enum {
         /* These ones take file names */
diff --git a/src/user-sessions.c b/src/user-sessions.c
index d3faad0..4518d95 100644
--- a/src/user-sessions.c
+++ b/src/user-sessions.c
@@ -42,8 +42,8 @@ int main(int argc, char*argv[]) {
         if (streq(argv[1], "start")) {
                 int q = 0, r = 0;
 
-                if (unlink("/var/run/nologin") < 0 && errno != ENOENT) {
-                        log_error("Failed to remove /var/run/nologin file: %m");
+                if (unlink("/run/nologin") < 0 && errno != ENOENT) {
+                        log_error("Failed to remove /run/nologin file: %m");
                         r = -errno;
                 }
 
@@ -59,8 +59,8 @@ int main(int argc, char*argv[]) {
                 int r, q;
                 char *cgroup_user_tree = NULL;
 
-                if ((r = write_one_line_file("/var/run/nologin", "System is going down.")) < 0)
-                        log_error("Failed to create /var/run/nologin: %s", strerror(-r));
+                if ((r = write_one_line_file("/run/nologin", "System is going down.")) < 0)
+                        log_error("Failed to create /run/nologin: %s", strerror(-r));
 
                 if ((q = cg_get_user_path(&cgroup_user_tree)) < 0) {
                         log_error("Failed to determine use path: %s", strerror(-q));



More information about the systemd-commits mailing list