Simplified sha-bang addition.

We are creating the /bin/bash symlink before entering to the chroot jail.
This commit is contained in:
Manuel Canales Esparcia 2006-12-04 12:49:35 +00:00
parent 4eba1eaecb
commit 5f4982dc54
5 changed files with 21 additions and 41 deletions

View file

@ -86,17 +86,11 @@
</xsl:variable> </xsl:variable>
<!-- Creating dirs and files --> <!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:choose> <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
<xsl:when test="../@id='chapter-chroot'"> <xsl:if test="not(@id='ch-system-stripping')">
<xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text> <xsl:text>set -e</xsl:text>
</xsl:when> </xsl:if>
<xsl:when test="@id='ch-system-stripping'"> <xsl:text>&#xA;</xsl:text>
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#!/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="sect2[@role='installation']"> <xsl:if test="sect2[@role='installation']">
<xsl:text>cd $PKGDIR&#xA;</xsl:text> <xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">

View file

@ -68,8 +68,9 @@
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text> <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
<xsl:if test="not(@id='ch-system-stripping')"> <xsl:if test="not(@id='ch-system-stripping')">
<xsl:text>set -e&#xA;&#xA;</xsl:text> <xsl:text>set -e&#xA;</xsl:text>
</xsl:if> </xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:if test="sect2[@role='installation']"> <xsl:if test="sect2[@role='installation']">
<xsl:text>cd $PKGDIR&#xA;</xsl:text> <xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">

View file

@ -68,8 +68,9 @@
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text> <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
<xsl:if test="not(@id='ch-system-stripping')"> <xsl:if test="not(@id='ch-system-stripping')">
<xsl:text>set -e&#xA;&#xA;</xsl:text> <xsl:text>set -e&#xA;</xsl:text>
</xsl:if> </xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:if test="sect2[@role='installation']"> <xsl:if test="sect2[@role='installation']">
<xsl:text>cd $PKGDIR&#xA;</xsl:text> <xsl:text>cd $PKGDIR&#xA;</xsl:text>
</xsl:if> </xsl:if>

View file

@ -83,20 +83,12 @@
</xsl:variable> </xsl:variable>
<!-- Creating dirs and files --> <!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:choose> <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
<xsl:when test="@id='ch-system-changingowner' or <xsl:if test="not(@id='ch-tools-stripping') and
@id='ch-system-creatingdirs' or not(@id='ch-system-strippingagain')">
@id='ch-system-createfiles'"> <xsl:text>set -e&#xA;</xsl:text>
<xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text> </xsl:if>
</xsl:when> <xsl:text>&#xA;</xsl:text>
<xsl:when test="@id='ch-tools-stripping' or
@id='ch-system-strippingagain'">
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#!/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="(sect2[@role='installation'] and <xsl:if test="(sect2[@role='installation'] and
not(@id='bootable-kernel'))"> not(@id='bootable-kernel'))">
<xsl:text>cd $PKGDIR&#xA;</xsl:text> <xsl:text>cd $PKGDIR&#xA;</xsl:text>

View file

@ -74,20 +74,12 @@
</xsl:variable> </xsl:variable>
<!-- Creating dirs and files --> <!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:choose> <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
<xsl:when test="@id='ch-system-changingowner' or <xsl:if test="not(@id='ch-tools-stripping') and
@id='ch-system-creatingdirs' or not(@id='ch-system-strippingagain')">
@id='ch-system-createfiles'"> <xsl:text>set -e&#xA;</xsl:text>
<xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text> </xsl:if>
</xsl:when> <xsl:text>&#xA;</xsl:text>
<xsl:when test="@id='ch-tools-stripping' or
@id='ch-system-strippingagain'">
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#!/bin/bash&#xA;set +h&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="sect2[@role='installation']"> <xsl:if test="sect2[@role='installation']">
<xsl:text>cd $PKGDIR&#xA;</xsl:text> <xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">