From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] Q: systemd policy ?
Date: Sat, 5 May 2012 23:55:30 +0400
Message-ID: <20120505195530.GA17642@altlinux.org> (raw)
In-Reply-To: <20120505182455.GA11787@dad.imath.kiev.ua>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
On Sat, May 05, 2012 at 09:24:56PM +0300, Igor Vlasenko wrote:
> Первый вопрос: где filetriggers для systemd service файлов?
> Я искал и не нашел, а ведь это важный кусок функциональности -
> при сносе/обновлении пакета надо останавливать/передергивать
> соответствующую службу.
>
> Без них это баг, ведь иначе придется мусорить в спеках
> наподобие федоры, (см. внизу) но еще хуже,
> ведь systemd опционален.
У нас chkconfig и service пока справляются и без триггеров.
До тех пор, пока в пакетах есть sysv-скрипты, и нет нестандартных задач,
обычные %post_service и %preun_service будут продолжать справляться.
Возможно ли создать такой универсальный файлтриггер, который бы не наломал
дров в нестандартной ситуации? Навскидку мне кажется, что нет, но вы
можете попробовать доказать обратное.
> %post
> if [ $1 -eq 1 ] ; then
> # Initial installation
> /bin/systemctl daemon-reload >/dev/null 2>&1 || :
> fi
Это сейчас делает %post_service посредством chkconfig.
> %preun
> if [ $1 -eq 0 ] ; then
> # Package removal, not upgrade
> /bin/systemctl --no-reload disable udpxy.service > /dev/null 2>&1 || :
Это сейчас делает %preun_service посредством chkconfig.
> /bin/systemctl stop udpxy.service > /dev/null 2>&1 || :
Это сейчас делает %preun_service посредством service.
> fi
> %postun
> /bin/systemctl daemon-reload >/dev/null 2>&1 || :
Это сейчас делает %post_service посредством chkconfig.
> if [ $1 -ge 1 ] ; then
> # Package upgrade, not uninstall
> /bin/systemctl try-restart udpxy.service >/dev/null 2>&1 || :
> fi
Это сейчас делает %post_service посредством service.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-05-05 19:55 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 18:24 Igor Vlasenko
2012-05-05 19:40 ` [devel] systemd & openvz Денис Смирнов
2012-05-05 20:05 ` Dmitry V. Levin
2012-05-05 20:19 ` Денис Смирнов
2012-05-05 19:55 ` Dmitry V. Levin [this message]
2012-05-05 20:25 ` [devel] Q: systemd policy ? Igor Vlasenko
2012-05-05 21:06 ` Dmitry V. Levin
2012-05-05 21:16 ` Igor Vlasenko
2012-05-05 21:17 ` Igor Vlasenko
2012-05-05 21:22 ` Igor Vlasenko
2012-05-05 21:48 ` Dmitry V. Levin
2012-05-05 21:58 ` Michael Shigorin
2012-05-05 22:17 ` Dmitry V. Levin
2012-05-05 21:59 ` led
2012-05-05 22:07 ` Igor Vlasenko
2012-05-07 10:28 ` Igor Vlasenko
2012-05-07 14:50 ` Михаил
2012-05-08 4:48 ` Ildar Mulyukov
2012-05-08 9:28 ` Михаил
2012-05-08 10:59 ` Ildar Mulyukov
2012-05-08 14:26 ` Igor Vlasenko
2012-05-08 14:31 ` Igor Vlasenko
2012-05-08 16:28 ` Денис Смирнов
2012-05-08 20:16 ` Igor Vlasenko
2012-05-08 20:54 ` Денис Смирнов
2012-05-08 21:25 ` Михаил
2012-05-09 18:39 ` Dmitry V. Levin
2012-05-09 21:02 ` Денис Смирнов
2012-05-09 21:24 ` Dmitry V. Levin
2012-05-09 21:53 ` Michael Shigorin
2012-05-09 21:57 ` Dmitry V. Levin
2012-05-09 22:00 ` Dmitry V. Levin
2012-05-10 12:05 ` Igor Vlasenko
2012-05-10 12:16 ` Dmitry V. Levin
2012-05-10 12:32 ` Igor Vlasenko
2012-05-09 22:03 ` led
2012-05-10 2:30 ` Денис Смирнов
2012-05-10 12:03 ` Igor Vlasenko
2012-05-10 2:40 ` Денис Смирнов
2012-05-10 11:37 ` Dmitry V. Levin
2012-05-10 11:52 ` [devel] [JT} " Michael Shigorin
2012-05-10 12:01 ` Dmitry V. Levin
2012-05-10 12:05 ` [devel] " Igor Vlasenko
2012-05-10 7:46 ` Alexey Shabalin
2012-05-10 12:25 ` Igor Vlasenko
2012-05-10 13:52 ` Igor Vlasenko
2012-05-11 3:55 ` Ildar Mulyukov
2012-05-13 20:38 ` Денис Смирнов
2012-05-13 20:51 ` Aleksey Novodvorsky
2012-05-14 10:49 ` Alexey Shabalin
2012-05-14 17:41 ` Денис Смирнов
2012-05-05 20:27 ` Igor Vlasenko
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=20120505195530.GA17642@altlinux.org \
--to=ldv@altlinux.org \
--cc=devel@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 Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git