Problem running systemd service script after autoyast installation

Rainer Krienke <[email protected]>
Newsgroups gmane.linux.suse.autoinstall
Message-ID <[email protected]>
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
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312
signature.asc (application/pgp-signature, 263 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlD+njoACgkQaldtjc/KDEp9hQCgjDk+BgkO6Nv0mQ/38V54DByg
WeUAoKqTKov+wTTukpgjHstWRVTC4M6l
=4jwY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.