bootctl: don't fail 'status' when the ESP has no random seed
Since f90efd2d13 the result of the
access() check for loader/random-seed is stored in 'r', which is what
verb_status() returns. A missing seed file then makes 'bootctl status'
exit with 1 without logging anything, even though it's only reported as
"Exists: no". Use 'k' for the check, like the other informational
probes in this function.
(cherry picked from commit 05808e11b9399e6c2149f1f524b3282545ba7569)
This commit is contained in:
committed by
Luca Boccassi
parent
d6bf5fbaf2
commit
f844429534
@@ -621,11 +621,11 @@ int verb_status(int argc, char *argv[], uintptr_t _data, void *userdata) {
|
||||
if (!p)
|
||||
return log_oom();
|
||||
|
||||
r = access(p, F_OK);
|
||||
if (r < 0 && errno != ENOENT)
|
||||
k = access(p, F_OK);
|
||||
if (k < 0 && errno != ENOENT)
|
||||
printf(" Exists: Can't access %s (%m)\n", p);
|
||||
else
|
||||
printf(" Exists: %s\n", yes_no(r >= 0));
|
||||
printf(" Exists: %s\n", yes_no(k >= 0));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user