* `$SYSTEMD_REPART_MKFS_OPTIONS_<FSTYPE>` – configure additional arguments to use for
`mkfs` when formatting partition file systems. There's one variable for each
of the supported file systems.
+
+* `$SYSTEMD_REPART_OVERRIDE_FSTYPE` – if set the value will override the file
+ system type specified in Format= lines in partition definition files.
void *userdata) {
char **fstype = ASSERT_PTR(data);
+ const char *e;
assert(rvalue);
+ /* Let's provide an easy way to override the chosen fstype for file system partitions */
+ e = secure_getenv("SYSTEMD_REPART_OVERRIDE_FSTYPE");
+ if (e && !streq(rvalue, e)) {
+ log_syntax(unit, LOG_NOTICE, filename, line, 0,
+ "Overriding defined file system type '%s' with '%s'.", rvalue, e);
+ rvalue = e;
+ }
+
if (!filename_is_valid(rvalue))
return log_syntax(unit, LOG_ERR, filename, line, 0,
"File system type is not valid, refusing: %s", rvalue);