On Thu, 09 Jul 2009 at 15:52:50 +0200, Patrick Schoenfeld wrote:
> The directory is created in postinst, based on what
> the user enters and is not deleted in postrm.
[...]
> - I'm not exactly confident, if this usage of debconf is okay, because I
>   remember (IIRC) that it was considered bad practice to abuse the
>   debconf database as a registry, which is basically what this one does.

This is indeed an abuse of debconf, as I understand it. The debconf-compliant
way to do this would be to parse whatever configuration file you wrote the
base directory into (if it still exists) to find the base directory, then
rmdir that.

Also, I think you want rmdir --ignore-fail-on-non-empty, or perhaps even
rmdir with errors ignored, rather than the rm -f from the patch - rm won't
remove directories, and using rm -r (with or without f) would destroy anything
the user had put in the tftp directory, which seems like a recipe for user
data loss.

Regards,
    Simon

Attachment: signature.asc
Description: Digital signature

Reply via email to