All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dvorkin Dmitry <dvorkin@tibbo.com>
To: yocto@yoctoproject.org
Subject: systemd postinstall start service
Date: Fri, 11 Dec 2015 09:47:08 +0300	[thread overview]
Message-ID: <566A716C.1060904@tibbo.com> (raw)
In-Reply-To: <BY1PR03MB13398A9786969B9BF6D630BFA10A0@BY1PR03MB1339.namprd03.prod.outlook.com>

Hello!

I have a recipe that can be installed into image using postinstall RPM 
scriptlet only.
It's an archive wrapped with a shell script.
During the do_rootfs step this RPM is installed such a way: executional 
archive placed into /opt/.
Then during the first system load systemd runs it's postinstall scriptlet

scriptlet is simple:

/opt/my_server.bin.sh
systemctl enable my_server.service
systemctl daemon-reload
systemctl start my_server.service

In my system when systemd runs this postinstall scriptlet it's executed, 
system is loaded, service is enabled, but not started.
service state is "enabled, but inactive (died)"
During the postinstall scriptlet execution at systemd first load I see 
message that my service is stopping instead of starting.
After reboot my_server.service is enabled and started.

Looks like systemd doesn't want to start service or it stopping it 
immediately after postinstall.
What can I do to start it on first load after postinstall ?

my_service.service have such a settings:

[Unit]
Description=my_server
After=syslog.target

[Service]
Type=simple
Restart=on-failure

Thanks!


      parent reply	other threads:[~2015-12-11  6:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06  5:47 testsuite for meta-selinux Suram Suram
2015-12-08 12:59 ` Voiculescu, BogdanX A
2015-12-11  6:47 ` Dvorkin Dmitry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=566A716C.1060904@tibbo.com \
    --to=dvorkin@tibbo.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.