Help!

question about initscripts

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Policy RSS
Next:  Coleen wrote:  
Author Message
Fergal Daly
External


Since: Dec 02, 2006
Posts: 2



PostPosted: Sat Dec 02, 2006 11:10 am    Post subject: question about initscripts
Archived from groups: linux>debian>policy (more info?)

Hi,

please redirect me if this is the wrong place for this discussion.
I've been reading

http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit

and involved in a bug discussion

https://launchpad.net/distros/ubuntu/+source/avahi/+bug/56426

about avahi-daemon's init script. It seems from a recent comment that
avahi-daemon might actually be a special case (in which case perhaps
it should not have an entry in /etc/init.d) so I'll phrase this as a
general question.

The document above says that "start" should "start the service" but it
seems there are quite a few debian packages where this does not work
because their initscripts contain things like

---
test -f /etc/default/fetchmail || exit 0
.. /etc/default/fetchmail
if [ ! "x$START_DAEMON" = "xyes" ]; then
echo "Edit /etc/default/fetchmail to start fetchmail"
exit 0
fi
---

I can see no point to this, it is a redundant second knob that needs
to be turned in order to start the service. It leads to confusion (see
the many duplicate ubuntu bugs about avahi daemon), it causes users to
have to go read the initscripts, it prevents GUI tools like
services-admin from "just working" and it seems to be against the
spirit of the policy document - "start" starts the daemon and
"update-rc.d" enables or disables the service.

Do you consider what happens inside the initscript to be beyond the
scope of debian policy or was it your intention that "start the
service" would mean that the initscript should definitely attempt to
start the service?

Thanks,

Fergal


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Back to top
Bill Allombert
External


Since: May 28, 2005
Posts: 192



PostPosted: Sun Dec 03, 2006 12:30 am    Post subject: Re: question about initscripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, Dec 02, 2006 at 04:51:11AM +0000, Fergal Daly wrote:
> Hi,
>
> about avahi-daemon's init script. It seems from a recent comment that
> avahi-daemon might actually be a special case (in which case perhaps
> it should not have an entry in /etc/init.d) so I'll phrase this as a
> general question.
>
> The document above says that "start" should "start the service" but it
> seems there are quite a few debian packages where this does not work
> because their initscripts contain things like
>
> ---
> test -f /etc/default/fetchmail || exit 0
> . /etc/default/fetchmail
> if [ ! "x$START_DAEMON" = "xyes" ]; then
> echo "Edit /etc/default/fetchmail to start fetchmail"
> exit 0
> fi
> ---

There are two issues here:

1) fetchmail is normally run by users. system-wide fetchmail service is
an interesting feature (I use it) but the majority of fetchmail users
do not need it. So the fetchmail package provide it but it is not
activate by default. However this does not prevent users to run fetchmail
for their own accounts.

2) To avoid unwanted behaviour, services should not start before they
are configured.

Cheers,
--
Bill.

Imagine a large blue swirl here.


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Back to top
Fergal Daly
External


Since: Dec 02, 2006
Posts: 2



PostPosted: Mon Dec 04, 2006 12:10 pm    Post subject: Re: question about initscripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 03/12/06, sean finney wrote:
> hi fergal,
>
> On Sat, 2006-12-02 at 04:51 +0000, Fergal Daly wrote:
> > The document above says that "start" should "start the service" but it
> > seems there are quite a few debian packages where this does not work
> > because their initscripts contain things like
> >
> > ---
> > test -f /etc/default/fetchmail || exit 0
> > . /etc/default/fetchmail
> > if [ ! "x$START_DAEMON" = "xyes" ]; then
> > echo "Edit /etc/default/fetchmail to start fetchmail"
> > exit 0
> > fi
> > ---
> >
> > I can see no point to this, it is a redundant second knob that needs
>
> in principle, i agree with you.
>
> i believe the rationale is that in many cases there's not a reasonable
> default configuration so the maintainer makes you jump through an extra
> hoop to make sure that you've configured it before it's ready to go.
> for example, spamassassin. however, i think that in such cases the
> package maintainer really ought to just ship the init script and not
> register it to start/stop at all, which makes much more sense in terms
> of policy's wording as well as the way things should be done with an
> init system.

It strikes me that the original authors probably didn't think it
necessary to explicitly say that "start the service" really does mean
that. Given the number of packages that don't conform, maybe it should
be added.

> but, i'm not the one who's going to spend any time/energy on picking a
> fight with package maintainers about it :/

Too late for me Smile Anyway, it looks like this will be resolved for the
next version of ubuntu (not sure what exactly that means for the
Debian package)

F

>
>
> sean
>
>
>


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Policy All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum