      # Test if the stripping phase must be skipped.
      # Skip alsp temp-perl for iterative runs
      case $this_script in
-@@ -502,6 +507,18 @@
+@@ -501,6 +506,18 @@
        *temp-perl*) [[ -n "$N" ]] && continue ;;
      esac
  

     # Grab the name of the target
     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
 
@@ -346,7 +365,9 @@
         wrt_RunAsRoot "${this_script}" "${file}"
         ;;
       *)   # The rest of Chapter06

     IFS=$saveIFS  # Restore the system defaults
Index: HLFS/hlfs.xsl
===================================================================
--- HLFS/hlfs.xsl	(revision 3007)
+++ HLFS/hlfs.xsl	(working copy)
@@ -46,6 +46,9 @@
   <xsl:param name="lang" select="C"/>
   <xsl:param name="lc_all" select="C"/>
 
+  <!-- Use paco? -->
+  <xsl:param name="use_paco" select="y"/>
+
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
   </xsl:template>
@@ -196,6 +199,10 @@
       <!-- Fixing bootscripts installation -->
       <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
                 string() = 'make install'">
+        <!-- inserting LD_PRELOAD before installing bootscripts -->
+        <xsl:if test="$use_paco != 'n' and $model != 'uclibc'">
+          <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        </xsl:if>
         <xsl:text>make install&#xA;</xsl:text>
         <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;&#xA;</xsl:text>
       </xsl:when>
@@ -296,6 +303,25 @@
         <xsl:apply-templates/>
         <xsl:text> || true&#xA;</xsl:text>
       </xsl:when>
+      <!-- paco begin -->
+      <!-- General rule -->
+      <xsl:when test="$use_paco != 'n' and $model != 'uclibc' and
+                ancestor::chapter[@id != 'chapter-temporary-tools'] and
+                contains(string(),'make') and
+                contains(string(),'install')">
+        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- Linux-libc-headers -->
+      <xsl:when test="$use_paco != 'n' and $model != 'uclibc' and
+                ancestor::sect1[@id='ch-system-linux-headers'] and
+                contains(string(),'install ')">
+        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- paco end -->
