* systemd configuration
@ 2013-07-02 17:40 Paul D. DeRocco
2013-07-02 22:17 ` Paul Eggleton
0 siblings, 1 reply; 3+ messages in thread
From: Paul D. DeRocco @ 2013-07-02 17:40 UTC (permalink / raw)
To: yocto
I've switched to systemd, in a core-image-base build for an Atom
(Cedartrail), and it boots fine. Now I want to make my own daemon start up.
I'm new to systemd, and the way it seems to be set up is different from the
way the systemd docs say it is usually set up.
The docs say that systemd, when booting up, usually activates a target
called default.target, which is symlinked to either multi-user.target or
graphical.target. (It would be the former in this GUI-less system.) Then, if
I want to cause my daemon to be started, I would add a symlink to its
systemd unit file to the .wants directory associated with multi-user.target.
But I can't find these things. They're not in the trees under /etc/systemd
or /run/systemd. Oh, and when I do "systemctl list-unit-files", it shows
both default.target and multi-user.target as disabled.
What makes this difficult to figure out is that the tools I have for
perusing the target system are so primitive. There's no editor in the target
that I'm aware of, and I can't network into the system and use an external
editor to examine various files. So my question is this: is there someplace
in build/tmp on my build system where the full target file system exists as
a directory tree, so that I can pore through it and see how systemd is
really configured?
Or perhaps someone can just tell me what target gets activated on bootup,
where its .wants directory is, and what directory I should put my daemon's
unit file into.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd configuration
2013-07-02 17:40 systemd configuration Paul D. DeRocco
@ 2013-07-02 22:17 ` Paul Eggleton
2013-07-03 8:30 ` Paul D. DeRocco
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2013-07-02 22:17 UTC (permalink / raw)
To: Paul D. DeRocco; +Cc: yocto
On Tuesday 02 July 2013 10:40:06 Paul D. DeRocco wrote:
> I've switched to systemd, in a core-image-base build for an Atom
> (Cedartrail), and it boots fine. Now I want to make my own daemon start up.
> I'm new to systemd, and the way it seems to be set up is different from the
> way the systemd docs say it is usually set up.
>
> The docs say that systemd, when booting up, usually activates a target
> called default.target, which is symlinked to either multi-user.target or
> graphical.target. (It would be the former in this GUI-less system.) Then, if
> I want to cause my daemon to be started, I would add a symlink to its
> systemd unit file to the .wants directory associated with
> multi-user.target.
>
> But I can't find these things. They're not in the trees under /etc/systemd
> or /run/systemd. Oh, and when I do "systemctl list-unit-files", it shows
> both default.target and multi-user.target as disabled.
>
> What makes this difficult to figure out is that the tools I have for
> perusing the target system are so primitive. There's no editor in the target
> that I'm aware of
That's entirely up to what you put into your image. busybox should provide a
very basic version of "vi" out of the box.
> , and I can't network into the system and use an external
> editor to examine various files.
Again, that's up to what you enable in the image. You could use NFS for
example.
> So my question is this: is there someplace
> in build/tmp on my build system where the full target file system exists as
> a directory tree, so that I can pore through it and see how systemd is
> really configured?
Sure, you can find in the "rootfs" subdirectory of the image's WORKDIR (which
you can find out using:
bitbake -e imagename | grep ^WORKDIR=
One way to look at this is to launch a devshell for the image:
bitbake -c devshell imagename
In 1.4+ using a devshell has the advantage of showing you the correct
permission/ownership of files within the root filesystem.
> Or perhaps someone can just tell me what target gets activated on bootup,
> where its .wants directory is, and what directory I should put my daemon's
> unit file into.
I'm sure someone more knowledgeable about systemd will pipe up with further
information, but I would suggest looking at other recipes for examples. AFAICT
systemd units for daemons should be installed into ${systemd_unitdir}/system.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd configuration
2013-07-02 22:17 ` Paul Eggleton
@ 2013-07-03 8:30 ` Paul D. DeRocco
0 siblings, 0 replies; 3+ messages in thread
From: Paul D. DeRocco @ 2013-07-03 8:30 UTC (permalink / raw)
To: 'Paul Eggleton'; +Cc: yocto
> From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
>
> That's entirely up to what you put into your image. busybox
> should provide a very basic version of "vi" out of the box.
Ah, vi. I guess it's time to learn vi.
> Sure, you can find in the "rootfs" subdirectory of the
> image's WORKDIR (which you can find out using:
>
> bitbake -e imagename | grep ^WORKDIR=
>
> One way to look at this is to launch a devshell for the image:
>
> bitbake -c devshell imagename
>
> In 1.4+ using a devshell has the advantage of showing you the correct
> permission/ownership of files within the root filesystem.
For my purpose, the first choice turned out to be sufficient.
> > Or perhaps someone can just tell me what target gets
> > activated on bootup,
> > where its .wants directory is, and what directory I should
> > put my daemon's unit file into.
>
> I'm sure someone more knowledgeable about systemd will pipe
> up with further
> information, but I would suggest looking at other recipes for
> examples. AFAICT
> systemd units for daemons should be installed into
> ${systemd_unitdir}/system.
Turns out I was confused by the fact that there is no multi-user.target
file, since it's just an empty unit. But there is a multi-user.target.wants
directory, so I'm all set.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-03 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 17:40 systemd configuration Paul D. DeRocco
2013-07-02 22:17 ` Paul Eggleton
2013-07-03 8:30 ` Paul D. DeRocco
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.