mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
change remaining /var/run to /run
This commit is contained in:
parent
d19c883d50
commit
db019b8dd2
@ -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");
|
||||
|
@ -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];
|
||||
|
@ -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 */
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user