this only controls use of Unicode emoji glyphs, and has no effect on other
Unicode glyphs.
+* `$RUNTIME_DIRECTORY` — various tools use this variable to locate the
+ appropriate path under /run. This variable is also set by the manager when
+ RuntimeDirectory= is used, see systemd.exec(5).
+
systemctl:
* `$SYSTEMCTL_FORCE_BUS=1` — if set, do not connect to PID1's private D-Bus
static bool arg_enabled = true;
static bool arg_read_crypttab = true;
static const char *arg_crypttab = NULL;
+static const char *arg_runtime_directory = NULL;
static bool arg_whitelist = false;
static Hashmap *arg_disks = NULL;
static char *arg_default_options = NULL;
assert(unit);
assert(mount);
- r = mkdir_parents("/run/systemd/cryptsetup", 0755);
+ r = mkdir_parents(arg_runtime_directory, 0755);
if (r < 0)
return r;
- r = mkdir("/run/systemd/cryptsetup", 0700);
+ r = mkdir(arg_runtime_directory, 0700);
if (r < 0 && errno != EEXIST)
return -errno;
if (!name_escaped)
return -ENOMEM;
- where = strjoin("/run/systemd/cryptsetup/keydev-", name_escaped);
+ where = strjoin(arg_runtime_directory, "/keydev-", name_escaped);
if (!where)
return -ENOMEM;
assert_se(arg_dest = dest);
arg_crypttab = getenv("SYSTEMD_CRYPTTAB") ?: "/etc/crypttab";
+ arg_runtime_directory = getenv("RUNTIME_DIRECTORY") ?: "/run/systemd/cryptsetup";
arg_disks = hashmap_new(&crypt_device_hash_ops);
if (!arg_disks)