Let's add the avatar disk template, which considers that the avatar file is stored together with the install scripts files, so we don't actually require the apps to set it (but, if they do, the value set will be used). Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- .../fedora-kickstart-desktop.xml.in | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in index d21fdbb..33f674c 100644 --- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in +++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in @@ -71,6 +71,25 @@ <xsl:value-of select="substring-after($script-disk, '/dev/')"/> </xsl:template> + <!-- The default values of avatar-disk consider the avatar is stored + in the same disk as the installation scripts. --> + <xsl:template name="avatar-disk"> + <xsl:choose> + <xsl:when test="config/avatar-disk != ''"> + <xsl:value-of select="config/avatar-disk"/> + </xsl:when> + <xsl:when test="os/version > 9"> + <xsl:text>/dev/sda</xsl:text> + </xsl:when> + <xsl:when test="os/version > 6"> + <xsl:text>/dev/sdb</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>/dev/hdb</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template name="keyboard"> <xsl:choose> <xsl:when test="os/version > 17"> @@ -225,7 +244,7 @@ fi # Set user avatar if test -n '<xsl:value-of select="config/avatar-location"/>'; then mkdir /mnt/unattended-media -mount <xsl:value-of select='config/avatar-disk'/> /mnt/unattended-media +mount <xsl:call-template name="avatar-disk"/> /mnt/unattended-media cp /mnt/unattended-media<xsl:value-of select="config/avatar-location"/> /var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/> umount /mnt/unattended-media fi -- 2.21.0 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo