firstboot: Don't check twice if /etc/shadow exists

This commit is contained in:
Daan De Meyer
2020-05-27 18:54:25 +02:00
parent bb2294e454
commit 1fbc95d388
+1 -5
View File
@@ -533,7 +533,7 @@ static int process_machine_id(void) {
}
static int prompt_root_password(void) {
const char *msg1, *msg2, *etc_shadow;
const char *msg1, *msg2;
int r;
if (arg_root_password)
@@ -542,10 +542,6 @@ static int prompt_root_password(void) {
if (!arg_prompt_root_password)
return 0;
etc_shadow = prefix_roota(arg_root, "/etc/shadow");
if (laccess(etc_shadow, F_OK) >= 0)
return 0;
print_welcome();
putchar('\n');