Re: Problem running systemd service script after autoyast installation
Joschi Brauchle <[email protected]>
| Newsgroups | gmane.linux.suse.autoinstall |
|---|---|
| Message-ID | <[email protected]> |
I think this might be related to https://bugzilla.novell.com/show_bug.cgi?id=769924 AutoYast only enables the required services during installation. Then, it used to do an "init $runlevel" to start them all up. The systemd equivalent does not seem to work correctly at this point. Basically, i have come to the conclusion that for >12.2, you currently HAVE TO reboot to get a working system with all services running. All workarounds I have tried have failed so far... On 01/22/2013 03:12 PM, Rainer Krienke wrote: > Hello, > > since opensuse 12.2 I use systemd instead of sysv-init. Most of the > systems I install this way need a full integration in our local > university network, which means the need of autofs as well as NIS and > LDAP and more modifications to the system. > > Installation of such linux systems is based on an autoyast file I > wrote. Part of this autoinstallation is a autoyast-post script that > creates a systemd lfinalinstall.service file, that should start later on > to do the network integration and all the rest. Before opensuse 12.2 > this was done via a /etc/init.d/lfinalinstall init script that did just > the same like the systemd lfinalinstall.service file does now. > > My problem is that I would like the service script to execute right > after the autoyast installation of linux has finished (without a further > reboot). So the autoyast installtion is done and the system comes up to > the default runlevel starting kdm and now the service script should start. > > This used to work fine for the /etc/init.d script in earlier suse > versions but does no longer work for 12.2 using systemd. The service > file is activated but won't start. Only If I reboot the system after the > complete autoyast installation one more time the script runs just fine, > but not after the autoyast driven installation when it boots up to the > default runlevel the first time, without one more reboot. > > The lfinalinstall.service file that is created by the autoyast post > script (also tried chroot script) looks like below. After the .service > file has been written I call /bin/systemctl enable lfinalinstall.service > as well as a /bin/systemctl daemon-reload command. > > > [Unit] > Description=install script > After=apparmor.service local-fs.target network.service > Before= > ConditionPathExists=/var/lib/lfinal/_run_install_ > > [Service] > Type=oneshot > Environment=SYSTEMD_NO_WRAP=1 TERM=linux > ExecStart=/var/lib/lfinal/lfinalinstall # do network integration > RemainAfterExit=yes > TimeoutSec=0 > ExecStartPost=/bin/rm -f /var/lib/lfinal/_run_install_ > StandardInput=tty > > [Install] > WantedBy=default.target > > The dependency file /var/lib/lfinal/_run_install_ is also in place. And > of course the real script to do the job /var/lib/lfinal/lfinalinstall is > also available and executable. > After autoyast istallation has completed a "systemctl status > lfinalinstall.service" shows this: > > $ systemctl status lfinalinstall.service > lfinalinstall.service - lfinalinstall install script > Loaded: loaded (/lib/systemd/system/lfinalinstall.service; > enabled) > Active: inactive (dead) > CGroup: name=systemd:/system/lfinalinstall.servic > > Now I wonder why this script won't start after the installation has > finished and the system boots up to the default runlevel? Does anyone > have an idea or perhaps an idea how to debug this problem? The autoyast > postinstall.log file shows that the lfinalinstall.service file has been > created and enabled and that "systemctl daemon-reload" has been executed. > > Thanks > Rainer > -- Dipl.-Ing. Joschi Brauchle, M.S. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: [email protected] Web: http://www.lnt.ei.tum.de/
smime.p7s
(application/pkcs7-signature, 4.5 KB) - not displayed