mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
firstboot: do not write vconsole.conf when arg_keymap is empty
This commit is contained in:
parent
4540ae7400
commit
a7353b4d14
@ -346,13 +346,15 @@ static int process_keymap(void) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (!isempty(arg_keymap))
|
if (isempty(arg_keymap))
|
||||||
keymap = STRV_MAKE(strjoina("KEYMAP=", arg_keymap));
|
|
||||||
|
|
||||||
if (!keymap)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mkdir_parents(etc_vconsoleconf, 0755);
|
keymap = STRV_MAKE(strjoina("KEYMAP=", arg_keymap));
|
||||||
|
|
||||||
|
r = mkdir_parents(etc_vconsoleconf, 0755);
|
||||||
|
if (r < 0)
|
||||||
|
return log_error_errno(r, "Failed to create the parent directory of %s: %m", etc_vconsoleconf);
|
||||||
|
|
||||||
r = write_env_file(etc_vconsoleconf, keymap);
|
r = write_env_file(etc_vconsoleconf, keymap);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to write %s: %m", etc_vconsoleconf);
|
return log_error_errno(r, "Failed to write %s: %m", etc_vconsoleconf);
|
||||||
|
Loading…
Reference in New Issue
Block a user