Trying to fix commands that need be run as root.

Need be verified.
This commit is contained in:
Manuel Canales Esparcia 2006-06-18 12:41:38 +00:00
parent 07eac51196
commit 1504208b7b

View file

@ -337,16 +337,15 @@
<!--======================== Commands code ==========================--> <!--======================== Commands code ==========================-->
<xsl:template match="screen"> <xsl:template match="screen">
<xsl:if test="child::* = userinput"> <xsl:if test="child::* = userinput and not(@role = 'nodump')">
<xsl:choose> <xsl:if test="@role = 'root'">
<xsl:when test="@role = 'nodump'"/> <xsl:text>sudo sh -c "</xsl:text>
<xsl:otherwise> </xsl:if>
<xsl:if test="@role = 'root'"> <xsl:apply-templates select="userinput"/>
<xsl:text>sudo </xsl:text> <xsl:if test="@role = 'root'">
</xsl:if> <xsl:text>"</xsl:text>
<xsl:apply-templates select="userinput" mode="screen"/> </xsl:if>
</xsl:otherwise> <xsl:text>&#xA;</xsl:text>
</xsl:choose>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
@ -361,9 +360,8 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="userinput" mode="screen"> <xsl:template match="userinput">
<xsl:apply-templates/> <xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="replaceable"> <xsl:template match="replaceable">