From bb29785e0df6a7cf07db0259a60bc1f3b4814cb4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 1 Apr 2011 15:25:46 +0200 Subject: [PATCH] general: replace a few uses of /var/run by /run --- Makefile.am | 2 +- man/pam_systemd.xml | 2 +- man/systemd.xml | 31 ++++++++++++++----------------- man/tmpfiles.d.xml | 4 ++-- src/gnome-ask-password-agent.vala | 2 +- src/pam-module.c | 11 +++++------ src/tmpfiles.c | 2 +- 7 files changed, 25 insertions(+), 29 deletions(-) diff --git a/Makefile.am b/Makefile.am index f6d34456..7f8e22a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,7 +59,7 @@ AM_CPPFLAGS = \ -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \ -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \ -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \ - -DRUNTIME_DIR=\"$(localstatedir)/run\" \ + -DRUNTIME_DIR=\"/run\" \ -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \ -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \ -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \ diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml index 43d239f4..11852eb0 100644 --- a/man/pam_systemd.xml +++ b/man/pam_systemd.xml @@ -65,7 +65,7 @@ If it does not exist yet, the user runtime directory - /var/run/user/$USER is + /run/user/$USER is created and its ownership changed to the user that is logging in. diff --git a/man/systemd.xml b/man/systemd.xml index 5a4c4ab9..a7dc4530 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -1024,20 +1024,19 @@ - /var/run/systemd/notify + /run/systemd/notify Daemon status - notification socket. This is an AF_UNIX - datagram socket in the Linux abstract - namespace, and is used to implement - the daemon notification logic as - implemented by + notification socket. This is an + AF_UNIX datagram socket and is used to + implement the daemon notification + logic as implemented by sd_notify3. - /var/run/systemd/logger + /run/systemd/logger Used internally by the systemd-logger.service @@ -1045,32 +1044,30 @@ of spawned processes to syslog3 or the kernel log buffer. This is an - AF_UNIX stream socket in the Linux - abstract namespace. + AF_UNIX stream + socket. - /var/run/systemd/shutdownd + /run/systemd/shutdownd Used internally by the shutdown8 tool to implement delayed shutdowns. This is an AF_UNIX datagram - socket in the Linux abstract - namespace. + socket. - /var/run/systemd/private + /run/systemd/private Used internally as communication channel between systemctl1 and the systemd process. This is an - AF_UNIX stream socket in the Linux - abstract namespace. This interface is - private to systemd and should not be - used in external + AF_UNIX stream socket. This interface + is private to systemd and should not + be used in external projects. diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 868b57e9..8568fcd5 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -58,7 +58,7 @@ /etc/tmpfiles.d/ to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside - in directories such as /var/run + in directories such as /run or /tmp. Each configuration file is named in the style of /etc/tmpfiles.d/<program>.conf. @@ -72,7 +72,7 @@ fields: Type Path Mode UID GID Age -d /var/run/user 0755 root root 10d +d /run/user 0755 root root 10d Type diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala index 4f89a3e6..2bfc6a9c 100644 --- a/src/gnome-ask-password-agent.vala +++ b/src/gnome-ask-password-agent.vala @@ -91,7 +91,7 @@ public class MyStatusIcon : StatusIcon { GLib.Object(icon_name : "dialog-password"); set_title("System Password Request"); - directory = File.new_for_path("/var/run/systemd/ask-password/"); + directory = File.new_for_path("/run/systemd/ask-password/"); file_monitor = directory.monitor_directory(0); file_monitor.changed.connect(file_monitor_changed); diff --git a/src/pam-module.c b/src/pam-module.c index 3a5404db..6486546e 100644 --- a/src/pam-module.c +++ b/src/pam-module.c @@ -239,11 +239,10 @@ static uint64_t get_session_id(int *mode) { ssize_t r; /* We do a bit of endianess swapping here, just to be - * sure. /var should be machine specific anyway, and - * /var/run even mounted from tmpfs, so this - * byteswapping should really not be necessary. But - * then again, you never know, so let's avoid any - * risk. */ + * sure. /run should be machine specific anyway, and + * even mounted from tmpfs, so this byteswapping + * should really not be necessary. But then again, you + * never know, so let's avoid any risk. */ if (loop_read(fd, &counter, sizeof(counter), false) != sizeof(counter)) counter = 1; @@ -435,7 +434,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( goto finish; } - /* Create /var/run/$USER */ + /* Create /run/user/$USER */ free(buf); if (asprintf(&buf, RUNTIME_DIR "/user/%s", username) < 0) { r = PAM_BUF_ERR; diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 68af37aa..e92b1123 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -47,7 +47,7 @@ /* 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, /var/run and + * properly owned directories beneath /tmp, /var/tmp, /run and * /var/lock which are volatile and hence need to be recreated on * bootup. */ -- 2.39.5