diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-05 09:57:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-05-07 23:33:09 +0200 |
commit | c76dd733afe04b36cdac16322a07201c5793f2df (patch) | |
tree | cae6b783b67849a6a7d1c285e633101f1d210cde /src/home/homed-home.c | |
parent | c07bf7a4edfa356d0b2dd7758f660624b5b97a06 (diff) | |
download | systemd-c76dd733afe04b36cdac16322a07201c5793f2df.tar.gz |
homed: make default storage/file system type configurable in homed.conf
Diffstat (limited to 'src/home/homed-home.c')
-rw-r--r-- | src/home/homed-home.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/home/homed-home.c b/src/home/homed-home.c index 07356e60c4..65e363c23c 100644 --- a/src/home/homed-home.c +++ b/src/home/homed-home.c @@ -1011,6 +1011,18 @@ static int home_start_work(Home *h, const char *verb, UserRecord *hr, UserRecord _exit(EXIT_FAILURE); } + if (h->manager->default_storage >= 0) + if (setenv("SYSTEMD_HOME_DEFAULT_STORAGE", user_storage_to_string(h->manager->default_storage), 1) < 0) { + log_error_errno(errno, "Failed to set $SYSTEMD_HOME_DEFAULT_STORAGE: %m"); + _exit(EXIT_FAILURE); + } + + if (h->manager->default_file_system_type) + if (setenv("SYSTEMD_HOME_DEFAULT_FILE_SYSTEM_TYPE", h->manager->default_file_system_type, 1) < 0) { + log_error_errno(errno, "Failed to set $SYSTEMD_HOME_DEFAULT_FILE_SYSTEM_TYPE: %m"); + _exit(EXIT_FAILURE); + } + r = rearrange_stdio(stdin_fd, stdout_fd, STDERR_FILENO); if (r < 0) { log_error_errno(r, "Failed to rearrange stdin/stdout/stderr: %m"); |