[Libosinfo] [osinfo-db 2/2] install-script, suse: Add install-scripts for SLES 11 SP4
Fabiano Fidêncio
fabiano at fidencio.org
Tue May 2 19:33:26 UTC 2017
On Tue, May 2, 2017 at 1:07 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Sun, Apr 23, 2017 at 12:41:31AM +0200, Fabiano Fidêncio wrote:
>> Some small changes have been done in the bootloader and in the patterns
>> currently used for SLES 12+ in order to also support the "old" SLES 11
>> SP4.
>>
>> Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
>> ---
>> .../suse.com/suse-autoyast-desktop.xml.in | 34 ++++++++++++++++++++--
>> .../suse.com/suse-autoyast-jeos.xml.in | 9 +++++-
>> data/os/suse.com/sles-11.4.xml.in | 9 ++++--
>> 3 files changed, 47 insertions(+), 5 deletions(-)
>>
>> diff --git a/data/install-script/suse.com/suse-autoyast-desktop.xml.in b/data/install-script/suse.com/suse-autoyast-desktop.xml.in
>> index acb38c1..381d621 100644
>> --- a/data/install-script/suse.com/suse-autoyast-desktop.xml.in
>> +++ b/data/install-script/suse.com/suse-autoyast-desktop.xml.in
>> @@ -86,7 +86,14 @@
>> <timeout config:type="integer">8</timeout>
>> <vgamode/>
>> </global>
>> - <loader_type>grub2</loader_type>
>> + <xsl:choose>
>> + <xsl:when test="os/version < 12">
>> + <loader_type>grub</loader_type>
>> + </xsl:when>
>> + <xsl:otherwise>
>> + <loader_type>grub2</loader_type>
>> + </xsl:otherwise>
>> + </xsl:choose>
>> </bootloader>
>> <firewall>
>> <enable_firewall config:type="boolean">false</enable_firewall>
>> @@ -172,13 +179,20 @@ if test -z '<xsl:value-of select="config/user-password"/>'; then
>> pam-config -a --unix-nullok
>> pam-config -a --nullok
>>
>> -<xsl:if test="os/version = 12">
>> +<xsl:if test="os/version < 12.1">
>
> I'd squash this hunk in the first patch. Does this mean we are not
> adding any users with older suse?
Nops. It means that as done for SLES 12, SLES 11 SP4 also has to have
the passwordless user created using useradd.
The reason that I've decided to not squash it into the first patch is
that I didn't know that SLES 11 SP4 would have the same behaviour as
SLES 12. /o\
I can squash if you prefer ...
>
>> useradd <xsl:value-of select="config/user-login"/> -m -G users
>> passwd -d <xsl:value-of select="config/user-login"/>
>> </xsl:if>
>>
>> #Enable passwordless login for users that are part of the nopasswdlogin group
>> +<xsl:choose>
>> + <xsl:when test="os/version < 12">
>> +sed -i '2 i auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' /etc/pam.d/gdm
>> + </xsl:when>
>> + <xsl:otherwise>
>> sed -i '4 i auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' /etc/pam.d/gdm-password
>> + </xsl:otherwise>
>> +</xsl:choose>
>
> Maybe you could match on the first empty line, and insert this line
> before it to avoid the special casing here? (I don't have a suse at hand
> to check this file content, tryin to guess after looking at my fedora
> install).
AFAIR I've tried to so, but this line must be exactly before the line
"auth required pam_unix.so". :-\
>
>> fi
>>
>> if test -n '<xsl:value-of select="config/avatar-location"/>'; then
>> @@ -213,6 +227,15 @@ fi
>> <pattern>base</pattern>
>> <pattern>gnome-basic</pattern>
>> <pattern>printing</pattern>
>
> Shouldn't these 2 lines be removed?
>
>
> Christophe
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo
>
Best Regards,
--
Fabiano Fidêncio
More information about the Libosinfo
mailing list