[Libosinfo] [osinfo-db 2/2] fedora: enclose strings used for shell ifs in quotes
Fabiano Fidêncio
fabiano at fidencio.org
Mon Jan 16 18:29:56 UTC 2017
It's necessary when doing if test -n <xsl:value-of ...> as `if test -n `
will simply return true.
For those `if test -z ` it's not strictly necessary, but doesn't hurt
having it there.
Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
---
.../fedoraproject.org/fedora-kickstart-desktop.xml.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 1fefebb..58f8d93 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
@@ -173,20 +173,20 @@ qemu-guest-agent
%post --erroronfail
useradd -G wheel <xsl:value-of select="config/user-login"/> # Add user
-if test -z <xsl:value-of select="config/user-password"/>; then
+if test -z "<xsl:value-of select="config/user-password"/>"; then
passwd -d <xsl:value-of select="config/user-login"/> # Make user account passwordless
else
echo <xsl:value-of select="config/user-password"/> |passwd --stdin <xsl:value-of select="config/user-login"/>
fi
-if test -z <xsl:value-of select="config/admin-password"/>; then
+if test -z "<xsl:value-of select="config/admin-password"/>"; then
passwd -d root # Make root account passwordless
else
echo <xsl:value-of select="config/admin-password"/> |passwd --stdin root
fi
# Set user avatar
-if test -n <xsl:value-of select="config/avatar-location"/>; then
+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
cp /mnt/unattended-media<xsl:value-of select="config/avatar-location"/> /var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/>
--
2.9.3
More information about the Libosinfo
mailing list