[osinfo-db 07/11] install-script, opensuse: Switch "<choose>" for an if

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fabiano Fidêncio <fabiano@xxxxxxxxxxxx>

There's no need to use a <xsl:choose> instead of a simple bash if in the
parts where it was replaced.

Also, it makes the script closer to the used for RHEL.

Signed-off-by: Fabiano Fidêncio <fabiano@xxxxxxxxxxxx>
---
 data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
index 932004a..14a3d26 100644
--- a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
+++ b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
@@ -251,8 +251,7 @@ pam-config -a --nullok
 sed -i '3 i auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' /etc/pam.d/gdm-password
 fi
 
-<xsl:choose>
-  <xsl:when test="config/avatar-location != ''">
+if test -n '<xsl:value-of select="config/avatar-location"/>'; then
 # Set user avatar
 mkdir /mnt/unattended-media
 mount <xsl:value-of select='config/avatar-disk'/> /mnt/unattended-media
@@ -265,8 +264,7 @@ Language=<xsl:value-of select="config/l10n-language"/>.UTF-8
 XSession=gnome
 Icon=/var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/>
 " >> /var/lib/AccountsService/users/<xsl:value-of select="config/user-login"/>
-  </xsl:when>
-</xsl:choose>
+fi
 
 # Enable default OpenSUSE repos
 zypper ar -f <xsl:call-template name="repo-oss"/> repo-oss
-- 
2.9.3

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux