ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Sergei Epiphanov <serpiph@nikiet.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] systemd и зависимость сервисов
Date: Fri, 21 Sep 2012 10:28:53 +0400
Message-ID: <4325704.hKcveEItNy@epiphanov.bkpi82.nikiet.ru> (raw)
In-Reply-To: <CAEdvWkQYdyg75nU=5cC_RgHdxmX-s0aqwTA84chBTo+xFH3ePw@mail.gmail.com>

On 20 сентября 2012 18:43 Alexey Shabalin wrote:
> если сервисы так зависят друг от друга, желательно в секцию [Install]
> добавить WantedBy=, RequiredBy=

Спасибо за наводку. Получается, что зависимости можно задавать несколькими 
путями:
1) Requires/Wants в секции Unit для скрытой зависимости;
2) RequiedBy/WantedBy в секции Install для явной зависимости;
3) ручным созданием симлинков в каталоге с именем файла сервиса и суффиксом 
.wants/.requires.

Но что делать, если политика требует копирования сервис-файла из 
/lib/systemd/system в /etc/systemd/system перед любой его правкой? А это 
приходится делать из-за того, что в 90% случаев нужно дополнительно вписывать 
Before/After в сам файл (больше некуда), а после обновления пакета сервис-файл 
от старой версии может привести к неработоспособности новой версии демона.

Впору делать подкаталоги <имя сервис-файла>.after/ и <имя сервис-
файла>.before/ по аналогии с .wants/.requires. Тогда порядок запуска будет 
отвязан и не помешают нормальному обновлению пакетов в дистрибутиве.

Я к тому, что .wants/.requires - это лишь половина порядка запуска.

-- 
С уважением, Епифанов Сергей

      reply	other threads:[~2012-09-21  6:28 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
2012-09-21  6:28   ` Sergei Epiphanov [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=4325704.hKcveEItNy@epiphanov.bkpi82.nikiet.ru \
    --to=serpiph@nikiet.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