[jhalfs] 02/04: lfs.xsl: generate custom user- and group-name

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch plabs/lfs-user
in repository jhalfs.

commit 462ecfda7fd7cde349f1d94a3f63b30c8eb5cc92
Author: Pierre Labastie <[email protected]>
AuthorDate: Mon Dec 30 17:18:35 2024 +0100

    lfs.xsl: generate custom user- and group-name
    
    We suppose the book mark them with
    <userinput remap="user">lfs</userinput> and
    <userinput remap="group">lfs</userinput>. we replace them with
    the names choosen by the user and passed into luser and lgroup
    parameters
---
 LFS/lfs.xsl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl
index 3d728b7..dad7dab 100644
--- a/LFS/lfs.xsl
+++ b/LFS/lfs.xsl
@@ -8,6 +8,10 @@
 
 <!-- Parameters -->
 
+  <!-- User name of the temporary user (lfs in book) -->
+  <xsl:param name="luser" select="'lfs'"/>
+  <!-- Group name of the temporary user (lfs in book) -->
+  <xsl:param name="lgroup" select="'lfs'"/>
   <!-- use package management ?
        n = no, original behavior
        y = yes, add PKG_DEST to scripts in install commands of chapter08-10
@@ -573,6 +577,15 @@ unset OLD_PKGDIR
         </xsl:choose>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when><!-- temp chapters install -->
+      <!-- If userinput is a child of userinput, we have luser or lgroup -->
+      <xsl:when test="parent::userinput">
+        <xsl:if test="@remap='user'">
+          <xsl:copy-of select="$luser"/>
+        </xsl:if>
+        <xsl:if test="@remap='group'">
+          <xsl:copy-of select="$lgroup"/>
+        </xsl:if>
+      </xsl:when>
       <!-- The rest of commands -->
       <xsl:otherwise>
         <xsl:apply-templates/>

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.