Re: [Bug#137321] executing of conffiles (init scripts) in postinst
On Sat, Mar 09, 2002 at 11:41:56PM +1000, Anthony Towns wrote:
> On Fri, Mar 08, 2002 at 11:49:04PM +0100, Eduard Bloch wrote:
> > > script and making it invalid POSIX sh is unsupported, and changing a
> > > conffile so that it's unusable by a program that reads it is
> > If I remove the execute bit from the script,
>
> Who says you can do such a thing? The proper way of disabling an init
> script is to put "exit 0" in it somewhere near the top. Nothing else is
> guaranteed to work reliably. Not changing permissions, not rm'ing it,
> even getting rid of the rc*.d/ symlinks (or file-rc equivalent).
>
> This is inelegant, yes, and the solution to that is the invoke-rc.d stuff
> we'll be rolling out next release.
I agree. Scripts should be executable, and configuration files are made to
be edited.
Apparently, dh_installinit inserts an if [ -x ... ] around init script
invocation; this probably encourages the erroneous belief that permissions
are a sensible way to disable an init script.
Didn't we already have this argu^H^H^H^Hdiscussion about using test -x to
check whether a package was removed but not purged?
--
- mdz
Reply to: