Re: executing of conffiles (init scripts) in postinst
Anthony Towns <aj@azure.humbug.org.au> writes:
> 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).
Nothing else? Creating a script /etc/init.d/nop:
===8<=======================================================
#! /bin/sh
echo "\``basename $0`' has been disabled in \`/etc/init.d'."
exit 0
===8<=======================================================
and linking it to the name of the real script after renaming that with
an ending .disabled has worked reliable for me for years.
--
The most important vi key sequence: ESC q !
exit and save the file -- from being corrupted.
Reply to: