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

Re: Bug#34408: samba: sambaconfig hoses inetd.conf if interrupted at first prompt (fwd)



Hi!

Julian Gilbey <J.D.Gilbey@qmw.ac.uk> wrote:

> Absolutely: you should ideally only touch any system config files
> (such as /etc/inetd.conf) when you know exactly what you are going to
> write to them, and even then, you should always modify a *copy* of
> them and when the modification is completed, copy the new version over
> the old one.  You might also consider leaving a copy of the old
> version on the system ("Original /etc/inetd.conf saved as
> /etc/inetd.conf.orig").

Well, I would agree with you that system files should be backed up before
making modifications to them. However, I don't think the postinst of my
package should be bloated to do this. I think it should be the program
that my postinst calls the one that should take care of things like
this. For example, if my program calls update-inetd then it should be this
program the one that makes the security copy of the original inetd.conf.

Just imagine the postinst script of each package that calls
update-inetd to modify inetd.conf making security copies of this file.
It would be a mess, and unnecessary bloat.

So, should I start filing bug reports against those packages that
modify system files without making copies of them first? I don't think
that's appropiate.

> I don't know how many of these you already implement; I haven't read
> your postinst.  But coding to cause the least possible damage, and
> revocable damage if it does occur, is always a good move.

Agreed.

> Finally, you might also want to check that your postinst (a) only
> plays around with /etc/inetd.conf when it should, perhaps only when
> called with a "configure" parameter, and (b) that it is idempotent:
> running it twice should not cause havoc.

Agreed, I'll check that.

Thanks,

peloy.-


Reply to: