Re: Support for legacy init script actions for systemd services

2012-07-06 Thread Bill Nottingham
Bill Nottingham (nott...@redhat.com) said: 
 WHEN THIS WILL LAND
 
 It's in initscripts git now, will package shortly for F18/F17/F16.

initscripts-9.38-1.fc18
initscripts-9.37.1-1.fc17
initscripts-9.34.3-1.fc16

to be precise.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-29 Thread Bill Nottingham
Jonathan Underwood (jonathan.underw...@gmail.com) said: 
 On 26 June 2012 21:11, Bill Nottingham nott...@redhat.com wrote:
  For each legacy option (such as xyzzy) supported by your init script (such
  as frobozz), package an executable script named:
 
   /usr/libexec/initscripts/legacy-actions/frobozz/xyzzy
 
 
 Wouldn't
 
 /usr/lib/initscripts/legacy-actions/frobozz/xyzzy
 
 be a better location, given the general desire for libexec to disappear?

Six of one, half-dozen of the other. 

 Also, why the need for the legacy-actions part of the path?

It's for supporting legacy things included in former SysV scripts, not new
functionality. If you put new things there, you're doing it wrong.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-28 Thread Jonathan Underwood
On 26 June 2012 21:11, Bill Nottingham nott...@redhat.com wrote:
 For each legacy option (such as xyzzy) supported by your init script (such
 as frobozz), package an executable script named:

  /usr/libexec/initscripts/legacy-actions/frobozz/xyzzy


Wouldn't

/usr/lib/initscripts/legacy-actions/frobozz/xyzzy

be a better location, given the general desire for libexec to disappear?

Also, why the need for the legacy-actions part of the path?

Jonathan.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-27 Thread Tomas Mraz
On Tue, 2012-06-26 at 21:48 +, Jóhann B. Guðmundsson wrote: 
 On 06/26/2012 08:49 PM, Miloslav Trmač wrote:
  The preferred new way is that upstream implements the action in a way
  that is same across all distributions.  Which, in some sense, does not
  answer your question.
 
 First and foremost how big of a problem do you guys believe this?
 
 Secondly cant we add the rule that packager are required to request 
 permission from fesco to follow what is suggested before they implement 
 it so it can be ensured that it's actually required/necessary for them 
 to do this and at the same time a list gets created and populated with 
 the relevant packages?

Please no, please do not make Fedora and particularly FESCo a
bureaucratic machinery.
-- 
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
  Turkish proverb

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-27 Thread Bill Nottingham
Tom Lane (t...@redhat.com) said: 
 Bill Nottingham nott...@redhat.com writes:
  Better late than never (and thanks to Michal Schmidt), I've added support to
  /sbin/service for running legacy actions if specified.
 
 I'm confused.  Only 2 months ago I was told that this was firmly
 against policy and I should get rid of code that assumed it worked
 (which, btw, it already did):
 http://lists.fedoraproject.org/pipermail/packaging/2012-April/008314.html
 
 Did that packaging guideline get reverted already?

My reading is that this is completely consistent with that guideline - the
guideline states that the commands must be standalone helper scripts. That's
what this supports - it just creates a standard location and integration
point for those standalone helpers rather than having it completely ad-hoc.

  For each legacy option (such as xyzzy) supported by your init script (such
  as frobozz), package an executable script named:
/usr/libexec/initscripts/legacy-actions/frobozz/xyzzy
 
 What do we need to Require: for this?  Is there still a requirement to
 hide it in a foo-sysvinit subpackage?

You *could* require a new initscripts version once it's built, but I don't
know that it's entirely needed - it will be pushed for F16/F17/F18, and
initscripts is implicitly in the dependency chain for approximately
everything already.

No, it wouldn't need subpackaged.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-27 Thread Bill Nottingham
Miloslav Trmač (m...@volny.cz) said: 
 On Tue, Jun 26, 2012 at 10:45 PM, Till Maas opensou...@till.name wrote:
  2) Don't package a legacy action for new scripts or actions that were not
  supported by the prior init script; this is intended for compatibility with
  existing scripts and/or administrator brains.
 
  It would be nice to have a good plan about how to implement the
  preferred new way to accomplish such tasks to avoid that every package
  does this differently.
 
 The preferred new way is that upstream implements the action in a way
 that is same across all distributions.  Which, in some sense, does not
 answer your question.

To pick a couple of examples:

*tables implement operations such as 'panic' or 'save'. postfix implements
'flush'. These are not the sorts of commands that can be easily genericized
across multiple packages.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-27 Thread Bill Nottingham
Jóhann B. Guðmundsson (johan...@gmail.com) said: 
 On 06/26/2012 08:11 PM, Bill Nottingham wrote:
 Questions? Comments?
 
 You do realize what you have effectively just done by this dont you?

Merged a patch from a systemd maintainer?

Bill, not really interested in playing this game

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Bruno Wolff III

On Tue, Jun 26, 2012 at 16:11:19 -0400,
  Bill Nottingham nott...@redhat.com wrote:


Questions? Comments?


Thanks!
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Till Maas
On Tue, Jun 26, 2012 at 04:11:19PM -0400, Bill Nottingham wrote:

 BEST PRACTICES
 
 1) A legacy action of this sort should print to stderr the preferred way to
 accomplish the task, if one is supported.
 
 2) Don't package a legacy action for new scripts or actions that were not
 supported by the prior init script; this is intended for compatibility with
 existing scripts and/or administrator brains.

It would be nice to have a good plan about how to implement the
preferred new way to accomplish such tasks to avoid that every package
does this differently.

Regards
Till


pgpc0j74AAVh9.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Miloslav Trmač
On Tue, Jun 26, 2012 at 10:45 PM, Till Maas opensou...@till.name wrote:
 2) Don't package a legacy action for new scripts or actions that were not
 supported by the prior init script; this is intended for compatibility with
 existing scripts and/or administrator brains.

 It would be nice to have a good plan about how to implement the
 preferred new way to accomplish such tasks to avoid that every package
 does this differently.

The preferred new way is that upstream implements the action in a way
that is same across all distributions.  Which, in some sense, does not
answer your question.
Mirek
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Jóhann B. Guðmundsson

On 06/26/2012 08:11 PM, Bill Nottingham wrote:

Questions? Comments?


You do realize what you have effectively just done by this dont you?

JBG

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Tom Lane
Bill Nottingham nott...@redhat.com writes:
 Better late than never (and thanks to Michal Schmidt), I've added support to
 /sbin/service for running legacy actions if specified.

I'm confused.  Only 2 months ago I was told that this was firmly
against policy and I should get rid of code that assumed it worked
(which, btw, it already did):
http://lists.fedoraproject.org/pipermail/packaging/2012-April/008314.html

Did that packaging guideline get reverted already?

 For each legacy option (such as xyzzy) supported by your init script (such
 as frobozz), package an executable script named:
   /usr/libexec/initscripts/legacy-actions/frobozz/xyzzy

What do we need to Require: for this?  Is there still a requirement to
hide it in a foo-sysvinit subpackage?

regards, tom lane
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Jóhann B. Guðmundsson

On 06/26/2012 08:49 PM, Miloslav Trmač wrote:

The preferred new way is that upstream implements the action in a way
that is same across all distributions.  Which, in some sense, does not
answer your question.


First and foremost how big of a problem do you guys believe this?

Secondly cant we add the rule that packager are required to request 
permission from fesco to follow what is suggested before they implement 
it so it can be ensured that it's actually required/necessary for them 
to do this and at the same time a list gets created and populated with 
the relevant packages?


JBG
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Tom Lane
=?UTF-8?B?IkrDs2hhbm4gQi4gR3XDsG11bmRzc29uIg==?= johan...@gmail.com writes:
 On 06/26/2012 08:49 PM, Miloslav Trmač wrote:
 The preferred new way is that upstream implements the action in a way
 that is same across all distributions.  Which, in some sense, does not
 answer your question.

 First and foremost how big of a problem do you guys believe this?

 Secondly cant we add the rule that packager are required to request 
 permission from fesco to follow what is suggested before they implement 
 it so it can be ensured that it's actually required/necessary for them 
 to do this and at the same time a list gets created and populated with 
 the relevant packages?

The idea seems to be that you'd only implement actions that exist
in non-systemd initscripts.  As long as people adhere to that,
I don't see that we need controls or per-package permissions.  And
I don't really see why people wouldn't.  There are two possibilities
here: a given action is commonly performed via service special-verb
on non-systemd platforms, or it's done some other way.  If it's done
some other way elsewhere there is no very good reason not to do it
the same way in systemd-land.  On the other hand, if people are used
to service special-verb, the only likely result of taking that away
is that they will think systemd sucks and try to avoid platforms that
use it.

Personally, having gotten beat up repeatedly over the disappearance
of service postgresql initdb in systemd-land, I think this is a
great idea.

regards, tom lane
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Miloslav Trmač
On Tue, Jun 26, 2012 at 11:48 PM, Jóhann B. Guðmundsson
johan...@gmail.com wrote:
 On 06/26/2012 08:49 PM, Miloslav Trmač wrote:

 The preferred new way is that upstream implements the action in a way
 that is same across all distributions.  Which, in some sense, does not
 answer your question.


 First and foremost how big of a problem do you guys believe this?
What is this?

Breaking service foo action reason was just an unnecessary
regression that shouldn't have happened in the first place.  But given
the history and the length of time that has passed, I'd say that
whether to restore this functionality now is up to individual package
maintainers.

Asking upstreams to adopt things that used to be done in
distributions (and therefore were consistent within a distribution)
without suggesting a good convention to follow (suggesting a high
probability that they will not be consistent, and distributions will
not be allowed to make them consistent) sounds like a change for the
worse from the original state (it is, after all, one of the primary
roles of a distribution to collect various differing upstreams and
make a consistent OS from them) - but, well, the result will not be
different from any other inter-project inconsistencies, so I don't
view this as a problem.  To the extent that systemd initiated this
change, perhaps the convention should be suggested somewhere within
the systemd project, ideally with input from distributions?

 Secondly cant we add the rule that packager are required to request
 permission from fesco to follow what is suggested before they implement it
 so it can be ensured that it's actually required/necessary for them to do
 this
Is there any reason to forbid any implementation that follows the best
practices above?  And a reason to require special dispensation instead
of relying on the regular review process?

 and at the same time a list gets created and populated with the
 relevant packages?
What would be the purpose of such a list?
Mirek
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Miloslav Trmač
On Wed, Jun 27, 2012 at 12:04 AM, Tom Lane t...@redhat.com wrote:
 The idea seems to be that you'd only implement actions that exist
 in non-systemd initscripts.  As long as people adhere to that,
 I don't see that we need controls or per-package permissions.  And
 I don't really see why people wouldn't.

Well, there is the case of upstream refusing to care about
distribution specifics (or caring only about some obscure
distribution), making the it impossible to move the script upstream.
 It's not very likely that all distributions would agree on a single
script before starting to package that software - every distribution
would tend to use its own mechanism.
Mirek
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Jason L Tibbitts III
 TL == Tom Lane t...@redhat.com writes:

TL Did that packaging guideline get reverted already?

No, it didn't, but of course you know the packaging committee cannot
prevent an upstream from implementing whatever functionality they like.
We can of course revisit the prohibition if someone cares to file a
ticket.

 - J
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Toshio Kuratomi
On Tue, Jun 26, 2012 at 05:50:57PM -0400, Tom Lane wrote:
 Bill Nottingham nott...@redhat.com writes:
  Better late than never (and thanks to Michal Schmidt), I've added support to
  /sbin/service for running legacy actions if specified.
 
 I'm confused.  Only 2 months ago I was told that this was firmly
 against policy and I should get rid of code that assumed it worked
 (which, btw, it already did):
 http://lists.fedoraproject.org/pipermail/packaging/2012-April/008314.html
 
 Did that packaging guideline get reverted already?
 
  For each legacy option (such as xyzzy) supported by your init script (such
  as frobozz), package an executable script named:
/usr/libexec/initscripts/legacy-actions/frobozz/xyzzy
 
 What do we need to Require: for this?  Is there still a requirement to
 hide it in a foo-sysvinit subpackage?
 
If I'm reading this right, Bill's approach does not use a sysvinit script.
Instead, /usr/sbin/service has been patched to look for any nonstandard
commands in subdirectories of /usr/libexec/initscripts/legacy-actions/

The FPC hasn't been asked about this yet but I don't think it violates the
our objections to having legacy commands in init scripts as there is no init
script present.  It's clear that systemd commands are being handled by
systemd and these legacy commands are only available via the
/usr/sbin/service command.  I don't think we'd have an objection to using
this method if it works as I described it and someone asked us to officially
bless its usage.

-Toshio


pgpUBnlylj4Rz.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Jóhann B. Guðmundsson

On 06/26/2012 10:12 PM, Miloslav Trmač wrote:

What is this?


Sorry meant to say this is

There are maybe a handful of services that need this hence the 
precaution clause so packagers/maintainers simply don't choose to do 
exactly what Bill was referring to in 3)




Breaking service foo action reason was just an unnecessary
regression that shouldn't have happened in the first place.  But given
the history and the length of time that has passed, I'd say that
whether to restore this functionality now is up to individual package
maintainers.


Agreed and honestly this sudden turnaround now smells a bit like RHEL 
7 was a big contributing factor to that decision since this has been a 
know problem from the start..




Asking upstreams to adopt things that used to be done in
distributions (and therefore were consistent within a distribution)
without suggesting a good convention to follow (suggesting a high
probability that they will not be consistent, and distributions will
not be allowed to make them consistent) sounds like a change for the
worse from the original state (it is, after all, one of the primary
roles of a distribution to collect various differing upstreams and
make a consistent OS from them) - but, well, the result will not be
different from any other inter-project inconsistencies, so I don't
view this as a problem.  To the extent that systemd initiated this
change, perhaps the convention should be suggested somewhere within
the systemd project, ideally with input from distributions?


I would rather argue that various upstreams should reach agreement on 
how things should properly be done and moved forward and distribution 
downstream to the relevant upstream should adopt that rather then the 
other way around since the likely hood of that input you refer they 
should do will actually never make it out of the distribution due to 
distribution politics .


The /etc/sysconfig/foo and /etc/default/bar file problem which is 
explained in a bit more detail here [1] is perfect example on how 
distributions will never manage to agree amongst themselves to propose 
or provide input *together* because more often then not each 
distribution has a tendency to think that their way is the *right* way.


I should mentioned in relevance to the above example that I have yet to 
find an upstream maintainer that disagrees with the elimination of that 
difference between distributions and that elimination will never come to 
be until we stop exercise that administrators muscle memory Bill was 
referring to.


I'm pretty sure that this administrators muscle memory which has been 
referred to no longer exist amongst the administrators in the Fedora 
project since we have had the initial release that systemd got accepted 
in gone EOL and just for the Lennart haters that exist out there I 
should mention that *every* bug got addressed and fixed by the systemd 
team during F15 lifecycle.





Secondly cant we add the rule that packager are required to request
permission from fesco to follow what is suggested before they implement it
so it can be ensured that it's actually required/necessary for them to do
this

Is there any reason to forbid any implementation that follows the best
practices above?  And a reason to require special dispensation instead
of relying on the regular review process?


My concern are exactly the same as Bill mentions in item three on his list.




and at the same time a list gets created and populated with the
relevant packages?

What would be the purpose of such a list?


Informative

JBG

1. http://0pointer.de/blog/projects/on-etc-sysinit.html

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Tom Lane
=?UTF-8?B?IkrDs2hhbm4gQi4gR3XDsG11bmRzc29uIg==?= johan...@gmail.com writes:
 On 06/26/2012 10:12 PM, Miloslav Trmač wrote:
 Breaking service foo action reason was just an unnecessary
 regression that shouldn't have happened in the first place.

 Agreed and honestly this sudden turnaround now smells a bit like RHEL 
 7 was a big contributing factor to that decision since this has been a 
 know problem from the start..

I think you're right, and the reason why that's an issue is that people
who were previously on RHEL6 are being exposed to systemd for the first
time.  And they don't like it.

 Asking upstreams to adopt things that used to be done in
 distributions (and therefore were consistent within a distribution)
 without suggesting a good convention to follow (suggesting a high
 probability that they will not be consistent, and distributions will
 not be allowed to make them consistent) sounds like a change for the
 worse from the original state (it is, after all, one of the primary
 roles of a distribution to collect various differing upstreams and
 make a consistent OS from them) - but, well, the result will not be
 different from any other inter-project inconsistencies, so I don't
 view this as a problem.

 I would rather argue that various upstreams should reach agreement on 
 how things should properly be done and moved forward

I don't presume to speak for all upstreams, but I can tell you that
postgresql in particular is not likely to want to get involved here.
They have other things to worry about, and have always thought that
things like initscripts are mainly a packager's province anyway.
But the big picture from our point of view is that service postgresql
initdb has been the way to initialize a postgresql database for quite a
few years, on many platforms besides Red-Hat-based ones.  *We* are the
ones who are out of step, and only somebody blinded by the Systemd Is
The One True Way faith would fail to recognize that.

 I'm pretty sure that this administrators muscle memory which has been 
 referred to no longer exist amongst the administrators in the Fedora 
 project

I beg to differ.  If Bill doesn't get his wrist slapped by FPC, I'll
be implementing this for postgresql tomorrow, because I'm tired of
hearing complaints about it.

regards, tom lane
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Jóhann B. Guðmundsson

On 06/26/2012 11:54 PM, Tom Lane wrote:

=?UTF-8?B?IkrDs2hhbm4gQi4gR3XDsG11bmRzc29uIg==?= johan...@gmail.com writes:

On 06/26/2012 10:12 PM, Miloslav Trma� wrote:

Breaking service foo action reason was just an unnecessary
regression that shouldn't have happened in the first place.

Agreed and honestly this sudden turnaround now smells a bit like RHEL
7 was a big contributing factor to that decision since this has been a
know problem from the start..

I think you're right, and the reason why that's an issue is that people
who were previously on RHEL6 are being exposed to systemd for the first
time.  And they don't like it.


What's more alarming to me is that this is being handled in Fedora but 
not in RHEL where it should be from my pov since in the RHEL Users != 
Fedora Users
RHEL could just continue to use sysv/upstart for all If they wanted to 
if it's so important to their customer base...





Asking upstreams to adopt things that used to be done in
distributions (and therefore were consistent within a distribution)
without suggesting a good convention to follow (suggesting a high
probability that they will not be consistent, and distributions will
not be allowed to make them consistent) sounds like a change for the
worse from the original state (it is, after all, one of the primary
roles of a distribution to collect various differing upstreams and
make a consistent OS from them) - but, well, the result will not be
different from any other inter-project inconsistencies, so I don't
view this as a problem.

I would rather argue that various upstreams should reach agreement on
how things should properly be done and moved forward

I don't presume to speak for all upstreams, but I can tell you that
postgresql in particular is not likely to want to get involved here.
They have other things to worry about, and have always thought that
things like initscripts are mainly a packager's province anyway.
But the big picture from our point of view is that service postgresql
initdb has been the way to initialize a postgresql database for quite a
few years, on many platforms besides Red-Hat-based ones.  *We* are the
ones who are out of step, and only somebody blinded by the Systemd Is
The One True Way faith would fail to recognize that.


I was speaking genericly on distributions vs upstreams but since you are 
referring here specifically to postgresql why was it decided to do be 
done in the init script in the first place instead of standalone script?





I'm pretty sure that this administrators muscle memory which has been
referred to no longer exist amongst the administrators in the Fedora
project

I beg to differ.  If Bill doesn't get his wrist slapped by FPC, I'll
be implementing this for postgresql tomorrow, because I'm tired of
hearing complaints about it.


Which in turn will confusion every administrator that has been custom to 
do it the *new* way so you probably wind up having to workaround that as 
well one way or another yup a fracking mess to deal with...


If administrators have not gone accustom to systemd after what ca 2 
years now they never will...


JBG
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Michael Cronenworth

On 06/26/2012 06:54 PM, Tom Lane wrote:

I beg to differ.  If Bill doesn't get his wrist slapped by FPC, I'll
be implementing this for postgresql tomorrow, because I'm tired of
hearing complaints about it.


I must be the only one that prefers your separate postgresql-setup 
script over the call to service. IMHO service is dead.


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Mathieu Bridon
On Tue, 2012-06-26 at 21:51 -0500, Michael Cronenworth wrote:
 On 06/26/2012 06:54 PM, Tom Lane wrote:
  I beg to differ.  If Bill doesn't get his wrist slapped by FPC, I'll
  be implementing this for postgresql tomorrow, because I'm tired of
  hearing complaints about it.
 
 I must be the only one that prefers your separate postgresql-setup 
 script over the call to service.

You're not.

Especially since it handles multiple postgresql instances with an
optional parameter.

Tom, can you try to make sure the script
in /usr/libexec/initscripts/legacy-actions allows the same?

Ideally, it would be possible for the admin to do something minimal like
the following:
# ln -s /usr/libexec/initscripts/legacy-actions/myinstance \
/usr/libexec/initscripts/legacy-actions/postgresql

And the script would automatically know (based on the path) what service
it's supposed to handle (i.e get the right PGPORT and PGDATA)

Looking at postgresql-setup this shouldn't be too hard, instead of
getting:
SERVICE_NAME=$2
it could be something like:
SERVICE_NAME=$(basename $(dirname $0))

 IMHO service is dead.

Well, I guess we'll still be able to run
the /usr/libexec/initscripts/legacy-actions/foo/bar scripts manually? :)


-- 
Mathieu


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Tom Lane
Michael Cronenworth m...@cchtml.com writes:
 On 06/26/2012 06:54 PM, Tom Lane wrote:
 I beg to differ.  If Bill doesn't get his wrist slapped by FPC, I'll
 be implementing this for postgresql tomorrow, because I'm tired of
 hearing complaints about it.

 I must be the only one that prefers your separate postgresql-setup 
 script over the call to service. IMHO service is dead.

Well, I wouldn't remove postgresql-setup, since it's now been there
long enough to have possibly acquired some fans.  But it's the non-fans
who are complaining...

regards, tom lane
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: Support for legacy init script actions for systemd services

2012-06-26 Thread Tom Lane
Mathieu Bridon boche...@fedoraproject.org writes:
 Especially since it handles multiple postgresql instances with an
 optional parameter.

 Tom, can you try to make sure the script
 in /usr/libexec/initscripts/legacy-actions allows the same?

Unless Bill hacked /sbin/service to pass additional parameters through
to the legacy script, I don't see how.  Anyway this seems a bit outside
the charter of the legacy-script feature, which IIUC is to let you do
exactly what you did before.  If you now prefer postgresql-setup,
by all means keep using that.

regards, tom lane
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel