From: Alexey Shabalin <a.shabalin@gmail.com>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] systemd и зависимость сервисов
Date: Thu, 20 Sep 2012 18:43:59 +0400
Message-ID: <CAEdvWkQYdyg75nU=5cC_RgHdxmX-s0aqwTA84chBTo+xFH3ePw@mail.gmail.com> (raw)
In-Reply-To: <7888424.VXctFiEWtK@epiphanov.bkpi82.nikiet.ru>
20 сентября 2012 г., 18:30 пользователь Sergei Epiphanov
<serpiph@nikiet.ru> написал:
> Что-то я никак не пойму. Есть 2 файла сервисов, в которых прописаны
> зависимости одного относительно другого. Эти зависимости отрабатываются при
> старте системы (внешне похоже на это), а при наборе команды 'systemctl start
> second.service' почему-то не поднимается сервис first.service. Аналогично
> команда 'systemctl stop first.service' почему-то не останавливает
> second.service
>
> first.service:
> [Unit]
> Before=second.service
>
> second.service:
> [Unit]
> After=first.service
>
> Почему такая несправедливость? systemd-189-alt3.
After/Befor - только указывает порядок. "мягкие" зависимости.
Почитайте man systemd.unit на предмет Requires, Wants, PartOf
если сервисы так зависят друг от друга, желательно в секцию [Install]
добавить WantedBy=, RequiredBy=
--
Alexey Shabalin
next prev parent reply other threads:[~2012-09-20 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 14:30 Sergei Epiphanov
2012-09-20 14:43 ` Alexey Shabalin [this message]
2012-09-21 6:28 ` Sergei Epiphanov
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='CAEdvWkQYdyg75nU=5cC_RgHdxmX-s0aqwTA84chBTo+xFH3ePw@mail.gmail.com' \
--to=a.shabalin@gmail.com \
--cc=shaba@altlinux.ru \
--cc=sisyphus@lists.altlinux.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
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git