Skip to content

Commit

Permalink
getty: trigger /etc/issue compat mode for Alpine Linux
Browse files Browse the repository at this point in the history
The /etc/issue file on Alpine Linux says "Kernel \r on an \m (\l)", so
\r needs to return the uts release rather than os-release VERSION.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Jan 7, 2024
1 parent 33a7f12 commit cd060e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/getty.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ static int osrel(struct osrel *rel)
snprintf(rel->version, sizeof(rel->version), "(%s)", codename);
}

if (rel->id[0] && !strcmp(rel->id, "alpine"))
return 1; /* compat mode for \r et al. */

return 0;
}

Expand Down

0 comments on commit cd060e8

Please sign in to comment.