[sles-beta] SLES12 RC2 x86_64 Login possible even though autoyast init-script is still runing

urs.frey at post.ch urs.frey at post.ch
Tue Aug 26 08:10:50 MDT 2014


Hi Josef

This would mean, that when entering autoinst init-script I would have to modify 
/usr/lib/systemd/system/autoyast-initscripts.service

With the additional line
h05cni:~ # cat /usr/lib/systemd/system/autoyast-initscripts.service
[Unit]
Description=Autoyast2 Init Scripts
After=remote-fs.target network.target time-sync.target mail-transfer-agent.target hwscan.service ypbind.service YaST2-Second-Stage.service
Before= systemd-logind.target

[Service]
Type=oneshot
Environment=TERM=linux
ExecStartPre=-/usr/bin/plymouth --hide-splash
ExecStart=/usr/lib/YaST2/bin/autoyast-initscripts.sh
RemainAfterExit=yes
TimeoutSec=0

[Install]
WantedBy=default.target

h05cni:~ #

Then reload/refresh systemd

Because autoyast-init script does run only once I my leave it as is

Maybe this is the systemD way

Will have to test and go into it.

Anyway again: 
Allowing login and this way pretending, the installation has already terminated is very ugly and really not for professional use.

regards

Urs Frey                                              
Post CH AG
Informationstechnologie
IT Betrieb 
Webergutstrasse 12 
3030 Bern (Zollikofen) 
Telefon : ++41 (0)58 338 58 70 
FAX     : ++41 (0)58 667 30 07 
E-Mail:   urs.frey at post.ch


-----Ursprüngliche Nachricht-----
Von: Josef Reidinger [mailto:jreidinger at suse.cz] 
Gesendet: Tuesday, August 26, 2014 3:57 PM
An: Frey Urs, IT222
Cc: sles-beta at lists.suse.com
Betreff: Re: [sles-beta] SLES12 RC2 x86_64 Login possible even though autoyast init-script is still runing

Hi Urs,
you can modify autoyast-initscripts.service itself if you add in Unit
"Before" part with required service which is in your case
systemd-logind.service [1]. Question is if we can do it for everyone and
change default.

Josef

[1]
http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before=

On Tue, 26 Aug 2014 13:51:04 +0000
<urs.frey at post.ch> wrote:

> Hello Josef
> 
> I do not understand what you exactly mean
> I need to run / free user login after successful termination of
> autoinst init-script But as far as I understand the unit file, the
> initscript runs after the listed services below
> 
> h05cni:~ # cat /usr/lib/systemd/system/autoyast-initscripts.service
> [Unit]
> Description=Autoyast2 Init Scripts
> After=remote-fs.target network.target time-sync.target
> mail-transfer-agent.target hwscan.service ypbind.service
> YaST2-Second-Stage.service
> 
> [Service]
> Type=oneshot
> Environment=TERM=linux
> ExecStartPre=-/usr/bin/plymouth --hide-splash
> ExecStart=/usr/lib/YaST2/bin/autoyast-initscripts.sh
> RemainAfterExit=yes
> TimeoutSec=0
> 
> [Install]
> WantedBy=default.target
> 
> h05cni:~ #
> 
> So I guess, this one here should be modified to run after init-script
> during installation using autoyast
> 
> h05cni:~ # cat /usr/lib/systemd/system/systemd-logind.service
> #  This file is part of systemd.
> #
> #  systemd is free software; you can redistribute it and/or modify it
> #  under the terms of the GNU Lesser General Public License as
> published by #  the Free Software Foundation; either version 2.1 of
> the License, or #  (at your option) any later version.
> 
> [Unit]
> Description=Login Service
> Documentation=man:systemd-logind.service(8) man:logind.conf(5)
> Documentation=http://www.freedesktop.org/wiki/Software/systemd/logind
> Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
> Wants=user.slice
> After=nss-user-lookup.target user.slice
> 
> # Ask for the dbus socket. If running over kdbus, the socket will
> # not be actually used.
> Wants=dbus.socket
> After=dbus.socket
> 
> [Service]
> ExecStart=/usr/lib/systemd/systemd-logind
> Restart=always
> RestartSec=0
> BusName=org.freedesktop.login1
> CapabilityBoundingSet=CAP_SYS_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN
> CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER
> CAP_SYS_TTY_CONFIG WatchdogSec=1min
> 
> # Increase the default a bit in order to allow many simultaneous
> # logins since we keep one fd open per session.
> LimitNOFILE=16384
> h05cni:~ #
> 
> regards
> 
> 
> Urs Frey                                              
> Post CH AG
> Informationstechnologie
> IT Betrieb 
> Webergutstrasse 12 
> 3030 Bern (Zollikofen) 
> Telefon : ++41 (0)58 338 58 70 
> FAX     : ++41 (0)58 667 30 07 
> E-Mail:   urs.frey at post.ch
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: sles-beta-bounces at lists.suse.com
> [mailto:sles-beta-bounces at lists.suse.com] Im Auftrag von Josef
> Reidinger Gesendet: Tuesday, August 26, 2014 3:37 PM An:
> sles-beta at lists.suse.com Betreff: Re: [sles-beta] SLES12 RC2 x86_64
> Login possible even though autoyast init-script is still runing
> 
> On Tue, 26 Aug 2014 15:31:45 +0200
> "Thorsten Kukuk" <kukuk at suse.de> wrote:
> 
> > 
> > Hi,
> > 
> > On Tue, Aug 26, urs.frey at post.ch wrote:
> > 
> > > Hi
> > > 
> > > When trying to install SLES12 Rc2 x86_64 using autoyast with
> > > init-scripts within autoinst.xml the installation process does not
> > > wait until init-script has terminated. So I can already see the
> > > final login screen even though my init-script within autoinst.xml
> > > is still running
> > 
> > Yes, that's the new world of systemd: start every service as early
> > as possible in parallel.
> > 
> > > I consider this as bug.
> > > Please fix this within autoyast
> > 
> > I'm not sure if there is anything autoyast can do here.
> 
> Well, autoyast can add login to list of services that should be run
> after its init script here
> https://github.com/yast/yast-autoinstallation/blob/master/scripts/autoyast-initscripts.service#L3
> Currently it lists only some specific stuff, that can be ignored on
> target device. So it is possible if it is consider as requested
> behavior to run scripts before login prompt.
> 
> Josef
> 
> > 
> >   Thorsten
> > 
> 
> _______________________________________________
> sles-beta mailing list
> sles-beta at lists.suse.com
> http://lists.suse.com/mailman/listinfo/sles-beta
> 


More information about the sles-beta mailing list