[systemd-devel] [Install] question
Tomasz Torcz
tomek at pipebreaker.pl
Thu Aug 1 00:00:49 PDT 2013
On Thu, Aug 01, 2013 at 07:48:19AM +0100, lux-integ wrote:
> Greetings,
>
> I am trying to learn to use systemd.
>
> I scanned through some of the online manpages and looked at some example unit
> files. I keep seeing
>
> [Install]
> WantedBy=multi-user.target
>
> or
>
> [Install]
> WantedBy=sysinit.target
>
> or some such
Description of targets is in "man systemd.special".
> I have for example a need to mount stuff (via a mount unit ) then to create
> directories and copy stuff to them
> I dont know if these '/bin/mkdir' and '/bin/cp' tasks can be done under
> '[Install]'
They cannot be in mount. There are few way to accomplish what you want,
but without details I can provide only vague directions. You need to create
unit for your work. You can stuff mkdir into ExecStartPre and cp into ExecStart;
you have to make your unit Require the mount unit (or go with the automounter);
activation of your work unit should trigger mount.
There are few details to work out, like for example usage of PartOf.
>
> Ib brief, I dont know what [Install] is for,
> --what goes under it?
> --when it is used ?
> --or not used etc ?
> --and I cant locate a manpage to explain it.
>
> I would be grateful if someone could send me the appropriate URL for 'Install'
> manpage and or explain what it is and how it is used.
Start with "man systemd.unit" and search for "[Install]". All four directives
are described there.
The information is used by "systemctl enable" command to create appropriate symlinks.
Man pages are also available at http://www.freedesktop.org/software/systemd/man/
--
Tomasz Torcz ,,(...) today's high-end is tomorrow's embedded processor.''
xmpp: zdzichubg at chrome.pl -- Mitchell Blank on LKML
More information about the systemd-devel
mailing list