Re: Systemd unit file implementation questions (ypbind)

2011-04-18 Thread Michal Hlavinka
> > > now, if you shut down A with "systemctl stop A", this will also stop B, > > > and it will do so in the inverse starting order. i.e. stop B first, stop > > > A second. BindTo= would do exactly the same here. The difference now > > > comes if for some reason A dies independently of anybody runn

Re: Systemd unit file implementation questions (ypbind)

2011-04-15 Thread Lennart Poettering
On Fri, 15.04.11 07:03, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > It was meant as an either or. > > > > > > The BindTo= reference in the man page does not mention that it will take > > > down with it any service bound to it when the service is stop. > > > > Requires= and BindTo= both d

Re: Systemd unit file implementation questions (ypbind)

2011-04-15 Thread Lennart Poettering
On Fri, 15.04.11 09:59, Mathieu Bridon (boche...@fedoraproject.org) wrote: > > On Fri, 2011-04-15 at 00:23 +0200, Lennart Poettering wrote: > > Note however that while some settings override others some act as > > additions. Example: A later User=foo will override an earlier User=bar, > > but a l

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
On Thursday, April 14, 2011 19:54:36 Lennart Poettering wrote: > On Thu, 14.04.11 16:15, "Jóhann B. Guðmundsson" (johan...@gmail.com) wrote: > > > > > On 04/14/2011 03:36 PM, Lennart Poettering wrote: > > >> In man systemd.unit > > >> > > > >> > BindTo= > > >> > Configures req

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Mathieu Bridon
On Fri, 2011-04-15 at 00:23 +0200, Lennart Poettering wrote: > Note however that while some settings override others some act as > additions. Example: A later User=foo will override an earlier User=bar, > but a later Requires=foo will be added to an earlier Requires=bar, so > that you effectively h

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 15:48, Simo Sorce (sso...@redhat.com) wrote: > On Thu, 14 Apr 2011 20:35:07 +0200 > Miloslav Trmač wrote: > > > On Thu, Apr 14, 2011 at 8:21 PM, Lennart Poettering > > wrote: > > > On Thu, 14.04.11 13:05, Chris Adams (cmad...@hiwaay.net) wrote: > > >> Since they are config file

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 20:35, Miloslav Trmač (m...@volny.cz) wrote: > > On Thu, Apr 14, 2011 at 8:21 PM, Lennart Poettering > wrote: > > On Thu, 14.04.11 13:05, Chris Adams (cmad...@hiwaay.net) wrote: > >> Since they are config files (unlike the init scripts themselves), > >> changing them doesn't lea

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Simo Sorce
On Thu, 14 Apr 2011 20:35:07 +0200 Miloslav Trmač wrote: > On Thu, Apr 14, 2011 at 8:21 PM, Lennart Poettering > wrote: > > On Thu, 14.04.11 13:05, Chris Adams (cmad...@hiwaay.net) wrote: > >> Since they are config files (unlike the init scripts themselves), > >> changing them doesn't leave you

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Miloslav Trmač
On Thu, Apr 14, 2011 at 8:21 PM, Lennart Poettering wrote: > On Thu, 14.04.11 13:05, Chris Adams (cmad...@hiwaay.net) wrote: >> Since they are config files (unlike the init scripts themselves), >> changing them doesn't leave you with RPM wanting to replace them on >> every package update either. >

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 13:05, Chris Adams (cmad...@hiwaay.net) wrote: > > Once upon a time, Lennart Poettering said: > > The place for system configuration is /etc. I have yet to see a really > > convincing example why /etc/sysconfig/ or /etc/default would win us > > anything. > > /etc/sysconfig is e

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Chris Adams
Once upon a time, Lennart Poettering said: > The place for system configuration is /etc. I have yet to see a really > convincing example why /etc/sysconfig/ or /etc/default would win us > anything. /etc/sysconfig is essentially configuration for the init system managing daemons. Command-line opt

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 16:15, "Jóhann B. Guðmundsson" (johan...@gmail.com) wrote: > > On 04/14/2011 03:36 PM, Lennart Poettering wrote: > >> In man systemd.unit > >> > > >> > BindTo= > >> > Configures requirement dependencies, very similar in style > >> > to Requires=, however in a

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 18:40, Michał Piotrowski (mkkp...@gmail.com) wrote: > > 2011/4/14 "Jóhann B. Guðmundsson" : > > On 04/14/2011 04:19 PM, Tomasz Torcz wrote: > >>> /etc/sysconfig/xxx is mostly a Fedora/Red Hat idiom. I am pretty sure > >>> >  the Debian version of the boot scripts do not honour th

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michał Piotrowski
2011/4/14 "Jóhann B. Guðmundsson" : > On 04/14/2011 04:19 PM, Tomasz Torcz wrote: >>> /etc/sysconfig/xxx is mostly a Fedora/Red Hat idiom. I am pretty sure >>> >  the Debian version of the boot scripts do not honour this request. >>    Debian has mostly identical /etc/default/xxx. >> > > Perhaps th

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 04:19 PM, Tomasz Torcz wrote: >> /etc/sysconfig/xxx is mostly a Fedora/Red Hat idiom. I am pretty sure >> > the Debian version of the boot scripts do not honour this request. >Debian has mostly identical /etc/default/xxx. > Perhaps the same team that look at /run changes can com

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Tomasz Torcz
On Thu, Apr 14, 2011 at 05:31:35PM +0200, Lennart Poettering wrote: > On Thu, 14.04.11 16:35, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > > > On Thursday, April 14, 2011 15:48:09 Lennart Poettering wrote: > > > On Thu, 14.04.11 14:51, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > > >

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 03:36 PM, Lennart Poettering wrote: >> In man systemd.unit >> > >> > BindTo= >> > Configures requirement dependencies, very similar in style >> > to Requires=, however in addition to this behaviour it also >> > declares that this unit is stopped when

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 14:57, "Jóhann B. Guðmundsson" (johan...@gmail.com) wrote: > > On 04/14/2011 02:35 PM, Michal Hlavinka wrote: > > If I use Requires= directive, it starts driver for upsd, but is it possible > > to specify to > > stop the driver when upsd stops? > > > > I think that you would us

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 16:35, Michal Hlavinka (mhlav...@redhat.com) wrote: > > On Thursday, April 14, 2011 15:48:09 Lennart Poettering wrote: > > On Thu, 14.04.11 14:51, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > > > > > > On Thursday, April 14, 2011 13:26:02 Michal Schmidt wrote: > > > > On

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 03:14 PM, Michał Piotrowski wrote: > I had such situation when I worked on shorewall scripts conversion. I > just didn't converted main shorewall-init script. At that time, I just > did not have idea how to run bash loop in systemd service:) Using bash loop within systemd is and shou

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michał Piotrowski
Hi, 2011/4/14 Michal Hlavinka : > On Thursday, April 14, 2011 14:46:01 Jóhann B. Guðmundsson wrote: >> On 04/14/2011 12:51 PM, Michal Hlavinka wrote: >> > >> >> Can you elaborate on this? >> > a) ups driver - runs when you have ups attached to that host >> > b) upsd - runs when you have ups attach

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
On Thursday, April 14, 2011 14:46:01 Jóhann B. Guðmundsson wrote: > On 04/14/2011 12:51 PM, Michal Hlavinka wrote: > > > >> Can you elaborate on this? > > a) ups driver - runs when you have ups attached to that host > > b) upsd - runs when you have ups attached to that host > > c) upsmon (master/sl

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 02:35 PM, Michal Hlavinka wrote: > If I use Requires= directive, it starts driver for upsd, but is it possible > to specify to > stop the driver when upsd stops? > I think that you would use BindTo= instead of Requires= in upsd.service ( that is if uspd is depend upon them being ru

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 12:51 PM, Michal Hlavinka wrote: > >> Can you elaborate on this? > a) ups driver - runs when you have ups attached to that host > b) upsd - runs when you have ups attached to that host > c) upsmon (master/slave mode) - usualy runs on machine where you have ups, > but it can run > on

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
On Thursday, April 14, 2011 15:48:09 Lennart Poettering wrote: > On Thu, 14.04.11 14:51, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > > > On Thursday, April 14, 2011 13:26:02 Michal Schmidt wrote: > > > On 04/14/2011 11:14 AM, Michal Hlavinka wrote: > > > > d) split it to more service files

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 09:51, Simo Sorce (sso...@redhat.com) wrote: > Systemd needs to offer a way to handle these situation until most > distributions decide to adopt systemd. Because upstream has to deal > primarily with sysvinit, and many will not care about systemd until it > is widespread. The way

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Simo Sorce
On Thu, 14 Apr 2011 15:28:28 +0200 Lennart Poettering wrote: > On Thu, 14.04.11 12:55, Michal Hlavinka (mhlav...@redhat.com) wrote: > > > > > On Thursday, April 14, 2011 09:54:59 Jóhann B. Guðmundsson wrote: > > > > > > > Is there a good solution for this? > > > > > > Which service ( file ) i

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 14:51, Michal Hlavinka (mhlav...@redhat.com) wrote: > > On Thursday, April 14, 2011 13:26:02 Michal Schmidt wrote: > > On 04/14/2011 11:14 AM, Michal Hlavinka wrote: > > > d) split it to more service files and make dependency there > > > > > > this would be incompatible change in

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 12:55, Michal Hlavinka (mhlav...@redhat.com) wrote: > > On Thursday, April 14, 2011 09:54:59 Jóhann B. Guðmundsson wrote: > > > > > Is there a good solution for this? > > > > Which service ( file ) is this. > > > > I can take a look at to see which way is best to approach it.

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Lennart Poettering
On Thu, 14.04.11 11:14, Michal Hlavinka (mhlav...@redhat.com) wrote: > > Hi, > > I have similar question (sorry for stealing this thread). I have package > that has 3 services (they somehow depend on each other). Based on > configuration in /etc/sysconfig/.. file it starts 2 or 3 services. Thi

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
On Thursday, April 14, 2011 13:26:02 Michal Schmidt wrote: > On 04/14/2011 11:14 AM, Michal Hlavinka wrote: > > d) split it to more service files and make dependency there > > > > this would be incompatible change in configuration and hard to do, > > Hard maybe, but solvable. Incompatibility happe

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
On 04/14/2011 09:14 AM, Michal Hlavinka wrote: > Is there a good solution for this? The right solution is to split this into three service files as I have done in bug 696611 then simply run systemctl start/stop/restart/reload/enable upsd-master.service # for master ( which start the upsd-mas

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Schmidt
On 04/14/2011 11:14 AM, Michal Hlavinka wrote: > d) split it to more service files and make dependency there > > this would be incompatible change in configuration and hard to do, Hard maybe, but solvable. Incompatibility happens from time to time. That's what release notes are for. I can imagine

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
On Thursday, April 14, 2011 09:54:59 Jóhann B. Guðmundsson wrote: > > > Is there a good solution for this? > > Which service ( file ) is this. > > I can take a look at to see which way is best to approach it. It's package nut : /etc/init.d/ups, there are 3 services: driver, upsd and upsmon. Al

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Jóhann B. Guðmundsson
> Is there a good solution for this? Which service ( file ) is this. I can take a look at to see which way is best to approach it. JBG -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Systemd unit file implementation questions (ypbind)

2011-04-14 Thread Michal Hlavinka
Hi, I have similar question (sorry for stealing this thread). I have package that has 3 services (they somehow depend on each other). Based on configuration in /etc/sysconfig/.. file it starts 2 or 3 services. This is handled by init script, but I don't know how to do it in systemd service file.

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Toshio Kuratomi
On Wed, Apr 13, 2011 at 09:41:58PM +, "Jóhann B. Guðmundsson" wrote: > On 04/13/2011 09:17 PM, Toshio Kuratomi wrote: > > On Wed, Apr 13, 2011 at 11:00:18PM +0200, Lennart Poettering wrote: > >> On Wed, 13.04.11 22:55, Miloslav Trmač (m...@volny.cz) wrote: > >> > >>> 2011/4/13 "Jóhann B. Guðmun

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Jóhann B. Guðmundsson
On 04/13/2011 09:17 PM, Toshio Kuratomi wrote: > On Wed, Apr 13, 2011 at 11:00:18PM +0200, Lennart Poettering wrote: >> On Wed, 13.04.11 22:55, Miloslav Trmač (m...@volny.cz) wrote: >> >>> 2011/4/13 "Jóhann B. Guðmundsson": It would be good if maintainers could take their time and assign

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Toshio Kuratomi
On Wed, Apr 13, 2011 at 11:00:18PM +0200, Lennart Poettering wrote: > On Wed, 13.04.11 22:55, Miloslav Trmač (m...@volny.cz) wrote: > > > > > 2011/4/13 "Jóhann B. Guðmundsson" : > > > It would be good if maintainers could take their time and assign > > > themselves to their components here [1] if

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Lennart Poettering
On Wed, 13.04.11 22:55, Miloslav Trmač (m...@volny.cz) wrote: > > 2011/4/13 "Jóhann B. Guðmundsson" : > > It would be good if maintainers could take their time and assign > > themselves to their components here [1] if they have the time to convert > > old sysv to a native systemd native one so th

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Miloslav Trmač
2011/4/13 "Jóhann B. Guðmundsson" : > It would be good if maintainers could take their time and assign > themselves to their components here [1] if they have the time to convert > old sysv to a native systemd native one so those of us that are helping > out and converting old sysv can better focus

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Jóhann B. Guðmundsson
On 04/13/2011 05:55 PM, Honza Horak wrote: > Hi, > > I'm working on systemd unit file for ypbind and found some problems, > that I'm not sure about: It would be good if maintainers could take their time and assign themselves to their components here [1] if they have the time to convert old sysv

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Toshio Kuratomi
On Wed, Apr 13, 2011 at 08:00:33PM +0200, Michał Piotrowski wrote: > Hi, > > 2011/4/13 Honza Horak : > > Hi, > > > > I'm working on systemd unit file for ypbind and found some problems, > > that I'm not sure about: > > > > 1) if I use systemctl enable/disable instead of chkconfig in %post and > >

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Lennart Poettering
On Wed, 13.04.11 19:55, Honza Horak (hho...@redhat.com) wrote: > Hi, > > I'm working on systemd unit file for ypbind and found some problems, > that I'm not sure about: > > 1) if I use systemctl enable/disable instead of chkconfig in %post and > %preun sections in spec file, rpmlint prints err

Re: Systemd unit file implementation questions (ypbind)

2011-04-13 Thread Michał Piotrowski
Hi, 2011/4/13 Honza Horak : > Hi, > > I'm working on systemd unit file for ypbind and found some problems, > that I'm not sure about: > > 1) if I use systemctl enable/disable instead of chkconfig in %post and > %preun sections in spec file, rpmlint prints errors: > postin-without-chkconfig /etc/rc