summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e918a1b)
Configuration will be in
root:root /run/systemd/network
and state will be in
systemd-network:systemd-network /run/systemd/netif
This matches what we do for logind's seat/session state.
if (!link->ifname)
return -ENOMEM;
if (!link->ifname)
return -ENOMEM;
- r = asprintf(&link->state_file, "/run/systemd/network/links/%"PRIu64,
+ r = asprintf(&link->state_file, "/run/systemd/netif/links/%"PRIu64,
link->ifindex);
if (r < 0)
return -ENOMEM;
link->ifindex);
if (r < 0)
return -ENOMEM;
- r = asprintf(&link->lease_file, "/run/systemd/network/leases/%"PRIu64,
+ r = asprintf(&link->lease_file, "/run/systemd/netif/leases/%"PRIu64,
link->ifindex);
if (r < 0)
return -ENOMEM;
link->ifindex);
if (r < 0)
return -ENOMEM;
- m->state_file = strdup("/run/systemd/network/state");
+ m->state_file = strdup("/run/systemd/netif/state");
if (!m->state_file)
return -ENOMEM;
if (!m->state_file)
return -ENOMEM;
/* Always create the directories people can create inotify
* watches in. */
/* Always create the directories people can create inotify
* watches in. */
- r = mkdir_safe_label("/run/systemd/network", 0755, uid, gid);
+ r = mkdir_safe_label("/run/systemd/netif", 0755, uid, gid);
if (r < 0)
log_error("Could not create runtime directory: %s",
strerror(-r));
if (r < 0)
log_error("Could not create runtime directory: %s",
strerror(-r));
- r = mkdir_safe_label("/run/systemd/network/links", 0755, uid, gid);
+ r = mkdir_safe_label("/run/systemd/netif/links", 0755, uid, gid);
if (r < 0)
log_error("Could not create runtime directory 'links': %s",
strerror(-r));
if (r < 0)
log_error("Could not create runtime directory 'links': %s",
strerror(-r));
- r = mkdir_safe_label("/run/systemd/network/leases", 0755, uid, gid);
+ r = mkdir_safe_label("/run/systemd/netif/leases", 0755, uid, gid);
if (r < 0)
log_error("Could not create runtime directory 'leases': %s",
strerror(-r));
if (r < 0)
log_error("Could not create runtime directory 'leases': %s",
strerror(-r));
assert(index);
assert(flags);
assert(index);
assert(flags);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "FLAGS", &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "FLAGS", &s, NULL);
assert_return(index, -EINVAL);
assert_return(state, -EINVAL);
assert_return(index, -EINVAL);
assert_return(state, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "ADMIN_STATE", &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "ADMIN_STATE", &s, NULL);
assert_return(state, -EINVAL);
assert_return(state, -EINVAL);
- r = parse_env_file("/run/systemd/network/state", NEWLINE, "OPER_STATE",
+ r = parse_env_file("/run/systemd/netif/state", NEWLINE, "OPER_STATE",
&s, NULL);
if (r == -ENOENT)
return -ENODATA;
&s, NULL);
if (r == -ENOENT)
return -ENODATA;
assert_return(index, -EINVAL);
assert_return(state, -EINVAL);
assert_return(index, -EINVAL);
assert_return(state, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "OPER_STATE", &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "OPER_STATE", &s, NULL);
assert_return(index, -EINVAL);
assert_return(ret, -EINVAL);
assert_return(index, -EINVAL);
assert_return(ret, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "DHCP_LEASE", &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "DHCP_LEASE", &s, NULL);
assert_return(addr, -EINVAL);
assert_return(addr_size, -EINVAL);
assert_return(addr, -EINVAL);
assert_return(addr_size, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
assert_return(addr, -EINVAL);
assert_return(addr_size, -EINVAL);
assert_return(addr, -EINVAL);
assert_return(addr_size, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
assert_return(index, -EINVAL);
assert_return(index, -EINVAL);
- if (asprintf(&p, "/run/systemd/network/links/%u", index) < 0)
+ if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
return -ENOMEM;
r = parse_env_file(p, NEWLINE, key, &s, NULL);
unsigned n = 0;
_cleanup_free_ uid_t *l = NULL;
unsigned n = 0;
_cleanup_free_ uid_t *l = NULL;
- d = opendir("/run/systemd/network/links/");
+ d = opendir("/run/systemd/netif/links/");
return -errno;
if (!category || streq(category, "links")) {
return -errno;
if (!category || streq(category, "links")) {
- k = inotify_add_watch(fd, "/run/systemd/network/links/", IN_MOVED_TO|IN_DELETE);
+ k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
safe_close(fd);
return -errno;
if (k < 0) {
safe_close(fd);
return -errno;
}
if (!category || streq(category, "leases")) {
}
if (!category || streq(category, "leases")) {
- k = inotify_add_watch(fd, "/run/systemd/network/leases/", IN_MOVED_TO|IN_DELETE);
+ k = inotify_add_watch(fd, "/run/systemd/netif/leases/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
safe_close(fd);
return -errno;
if (k < 0) {
safe_close(fd);
return -errno;
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
-d /run/systemd/network 0755 systemd-network systemd-network -
-d /run/systemd/network/links 0755 systemd-network systemd-network -
-d /run/systemd/network/leases 0755 systemd-network systemd-network -
+d /run/systemd/netif 0755 systemd-network systemd-network -
+d /run/systemd/netif/links 0755 systemd-network systemd-network -
+d /run/systemd/netif/leases 0755 systemd-network systemd-network -
m /var/log/journal 2755 root systemd-journal - -
Z /var/log/journal/%m 2755 root systemd-journal - -
m /var/log/journal 2755 root systemd-journal - -
Z /var/log/journal/%m 2755 root systemd-journal - -