From db019b8dd206844dcf5fde661256dc71fcc06fef Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 4 Apr 2011 15:33:00 +0200 Subject: [PATCH] change remaining /var/run to /run --- src/bridge.c | 2 +- src/shutdownd.c | 8 ++++---- src/tmpfiles.c | 5 ++--- src/user-sessions.c | 8 ++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/bridge.c b/src/bridge.c index 5ee058a3..878856cf 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 6b92ceeb..8f765b45 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 70a9ebd8..b21df95a 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 d3faad0c..4518d953 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)); -- 2.39.5