diff options
author | Pierre Labastie <pierre.labastie@neuf.fr> | 2023-11-13 13:44:32 +0100 |
---|---|---|
committer | Pierre Labastie <pierre.labastie@neuf.fr> | 2023-11-13 13:44:32 +0100 |
commit | 135217246721d7e42e29aa4d81a76e2fe14f655d (patch) | |
tree | 70aa4780066928f873eaa3d66ab71ff3d0d67f5d /common | |
parent | 74601a7f0673b4c60147db2bb4749d04a710734b (diff) | |
parent | 5ed69f823f28db12a5f56eb709ed8446f5070df0 (diff) |
Merge branch 'trunk' into xry111/parallelism
Diffstat (limited to 'common')
-rw-r--r-- | common/kernfs.xsl | 62 | ||||
-rw-r--r-- | common/libs/func_compare.sh | 6 | ||||
-rw-r--r-- | common/libs/func_validate_configs.sh | 2 |
3 files changed, 66 insertions, 4 deletions
diff --git a/common/kernfs.xsl b/common/kernfs.xsl index f47f665f01..d7043a0a8e 100644 --- a/common/kernfs.xsl +++ b/common/kernfs.xsl @@ -16,9 +16,69 @@ </xsl:template> <xsl:template match="userinput"> - <xsl:apply-templates/> + <xsl:call-template name="check-mount"> + <xsl:with-param name="mytext" select="string()"/> + </xsl:call-template> <xsl:text> </xsl:text> </xsl:template> + <xsl:template name="check-mount"> + <xsl:param name="mytext" select="''"/> + <xsl:choose> + <xsl:when test="contains($mytext,'
')"> + <xsl:call-template name="check-mount"> + <xsl:with-param name="mytext" + select="substring-before($mytext,'
')"/> + </xsl:call-template> + <xsl:text>
</xsl:text> + <xsl:call-template name="check-mount"> + <xsl:with-param name="mytext" + select="substring-after($mytext,'
')"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="starts-with(normalize-space($mytext),'mountpoint')"> + <xsl:copy-of select="$mytext"/> + </xsl:when> + <xsl:when test="starts-with(normalize-space($mytext),'mount')"> + <xsl:variable name="mountpoint"> + <xsl:call-template name="last-arg"> + <xsl:with-param name="myline" select="$mytext"/> + </xsl:call-template> + </xsl:variable> + <xsl:text>mountpoint -q </xsl:text> + <xsl:copy-of select="$mountpoint"/> + <xsl:text> || </xsl:text> + <xsl:copy-of select="$mytext"/> + </xsl:when> + <xsl:when test="starts-with(normalize-space($mytext),'umount')"> + <xsl:variable name="mountpoint"> + <xsl:call-template name="last-arg"> + <xsl:with-param name="myline" select="$mytext"/> + </xsl:call-template> + </xsl:variable> + <xsl:text>mountpoint -q </xsl:text> + <xsl:copy-of select="$mountpoint"/> + <xsl:text> && </xsl:text> + <xsl:copy-of select="$mytext"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$mytext"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="last-arg"> + <xsl:param name="myline" select="''"/> + <xsl:choose> + <xsl:when test="contains($myline,' ')"> + <xsl:call-template name="last-arg"> + <xsl:with-param name="myline" select="substring-after($myline,' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$myline"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> </xsl:stylesheet> diff --git a/common/libs/func_compare.sh b/common/libs/func_compare.sh index fb368b8ff1..2b6f9d1da2 100644 --- a/common/libs/func_compare.sh +++ b/common/libs/func_compare.sh @@ -22,9 +22,11 @@ wrt_compare_targets() { # local dir printf -v dir chapter%02d "$1" - sed -i '/userdel/d' $dir/*revised* + REVISED=cleanup + if ls $dir/*revised* 2>/dev/null; then REVISED=revised; fi + sed -i '/userdel/d' $dir/*$REVISED* for (( N = 2; N < ITERATIONS; N++ )); do - sed -i '/userdel/d' $dir-build_$N/*revised* + sed -i '/userdel/d' $dir-build_$N/*$REVISED* done } diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index b14cf8162e..ec21656a6c 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -29,7 +29,7 @@ inline_doc local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL" # Build Settings by book - local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL" + local -r LFS_build="$BUILD_chroot NCURSES5 $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL" # System Settings by book local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL" |