0005-FSDG-systemd-resolved-Fallback-hostname-to-gnu-linux.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 75ea90fc45e5d404ca7e2495b175f77c906ac7bb Mon Sep 17 00:00:00 2001
  2. From: Luke Shumaker <lukeshu@parabola.nu>
  3. Date: Wed, 25 May 2016 12:31:20 -0400
  4. Subject: [PATCH 5/7] FSDG: systemd-resolved: Fallback hostname to "gnu-linux"
  5. instead of "linux"
  6. ---
  7. man/hostname.xml | 2 +-
  8. src/resolve/resolved-manager.c | 4 ++--
  9. 2 files changed, 3 insertions(+), 3 deletions(-)
  10. diff --git a/man/hostname.xml b/man/hostname.xml
  11. index 746de21cd1..8960cf4a06 100644
  12. --- a/man/hostname.xml
  13. +++ b/man/hostname.xml
  14. @@ -79,7 +79,7 @@
  15. <listitem><para>Otherwise, a fallback hostname configured at compilation time will be used
  16. (<literal>&FALLBACK_HOSTNAME;</literal>).</para></listitem>
  17. - <!-- what about the "linux" fallback fallback? -->
  18. + <!-- what about the "gnu-linux" fallback? -->
  19. </itemizedlist>
  20. <para>Effectively, the static hostname has higher priority than a transient hostname, which has higher
  21. diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
  22. index 99787f7822..ca24918041 100644
  23. --- a/src/resolve/resolved-manager.c
  24. +++ b/src/resolve/resolved-manager.c
  25. @@ -374,7 +374,7 @@ static int determine_hostnames(char **full_hostname, char **llmnr_hostname, char
  26. static char* fallback_hostname(void) {
  27. /* Determine the fall back hostname. For exposing this system to the outside world, we cannot have it
  28. - * to be "localhost" even if that's the default hostname. In this case, let's revert to "linux"
  29. + * to be "localhost" even if that's the default hostname. In this case, let's revert to "gnu-linux"
  30. * instead. */
  31. _cleanup_free_ char *n = get_default_hostname();
  32. @@ -382,7 +382,7 @@ static char* fallback_hostname(void) {
  33. return NULL;
  34. if (is_localhost(n))
  35. - return strdup("linux");
  36. + return strdup("gnu-linux");
  37. return TAKE_PTR(n);
  38. }
  39. --
  40. 2.45.2