[jhalfs] branch trunk updated: Fix "hostname -f" on systemd
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Wed, 07 May 2025 14:21:59 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <174662771913.1699.14479247700090986097@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository jhalfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 0c3ce5b Fix "hostname -f" on systemd
0c3ce5b is described below
commit 0c3ce5b2487e8e314c9f4243a78e273daaa88cda
Author: Pierre Labastie <[email protected]>
AuthorDate: Wed May 7 16:18:17 2025 +0200
Fix "hostname -f" on systemd
The problem was that hostname -f would only return hostname,
without domainname. The reason is that /etc/hosts had this line:
<ip> FQDN
while to make hostname -f work, the line needs to be:
<ip> FQDN hostame
Use the "alias" replaceble field in systemd to replace it with
hostname
---
LFS/lfs.xsl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl
index 2b1d884..a24b2f5 100644
--- a/LFS/lfs.xsl
+++ b/LFS/lfs.xsl
@@ -650,7 +650,9 @@ unset OLD_PKGDIR
<xsl:text>.</xsl:text>
<xsl:value-of select="$domain"/>
</xsl:when>
- <xsl:when test="contains(string(.),'alias')"/>
+ <xsl:when test="contains(string(.),'alias')">
+ <xsl:value-of select="$hostname"/>
+ </xsl:when>
<xsl:when test="contains(string(.),'<lfs>')">
<xsl:value-of select="$hostname"/>
</xsl:when>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page