[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: diversion/conffile



>>"martin" == martin f krafft <madduck@madduck.net> writes:

 martin> also sprach Colin Watson <cjwatson@debian.org> [2002.02.19.1347 +0100]:
 >> If it's in /etc, please allow the sysadmin to change it, even if it
 >> doesn't seem to you that it might be needed.

 martin> okay. so maybe you can advice me. i am providing an add-on to
 martin> an existing daemon. in order for the add-on to be effective,
 martin> i need to use a different init.d script. i also would like to
 martin> disable the original init.d script with chmod 0 since it's
 martin> not needed and might actually lead to security problems.

	This is problematic. As it stands, if this file belongs to the
 parent package, it is a conffile of the parent package, and you are
 not supposed to modify a conffile in a script, far less the conffile
 of another package

	You should talk to the maintainer of the other package, and
 have his init.d script look for a file that your package creates
 (after asking the user, perhaps) that works kinda like
 /etc/nologin. When the file produced by your package exists, his
 init.d script exits, and yours works. Remove the file, his wirks,
 yours does not.

 martin> to stay independent of the original package, i wanted to
 martin> reuse the /etc/rc?.d links, and effectively divert the
 martin> original init.d script out of the way before placing my
 martin> init.d script into that very position, so that the links in
 martin> /etc/rd?.d will simply apply to mine.  however, because the
 martin> original package lists its init.d script as conffile, i can't
 martin> install my version via debian/rules. postinst is an option,
 martin> but i still don't like the situation of that file being a
 martin> conffile of another package. obviously.

	Using a postinst does not give you the riught to modify
 another packages conffile.

 martin> so right now, i install the add-on init.d script under a
 martin> different name, update-rc.d to remove the original init.d
 martin> script's rc?.d entries, chmod 0 it, and then add rc?.d
 martin> entries with update-rc.d for my new script. this makes
 martin> lintian bitch about extra update-rc.d calls in
 martin> {post,pr}{inst,rm} scripts, and it also means that i am (a)
 martin> hardcoding the update-rc.d parameters of the original package
 martin> into mine since i restore the initial situation on an apt-get
 martin> remove. and (b) if a sysadmin decided to modify the init.d
 martin> script's position in the rc?.d startup sequence, i overwrite
 martin> this modification.  unacceptable.

 martin> but i can't seem to find a way around this. any clues?

	Because you are not cooperating with the maintainer, but are
 trying a one off force overthrow, and this causes all kinds of
 problems. What if the other package is updatedd, with a changed
 /etc/init/d script? If the user accepts, you havce a strange
 situation.

	Surely havcing the packages (and the maintainers) cooperating
 is easy enough?

	manoj
-- 
 "I don't have to take this abuse from you -- I've got hundreds of
 people waiting to abuse me." Bill Murray, "Ghostbusters"
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: