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

Re: Proposed handling of generated configuration files (Re: stop the "manage with debconf" madness)



* Matt Zimmerman

 > Did you read my sample configuration scenario (xserver-xfree86),
 > or the threads that I referenced?  They explain in more detail.

  I did, and I can't see why ucf can't be done for this purpose,
 too;

 > As I said, I am suggesting we mimick the conffile mechanism.  conffiles
 > are not parsed, but their modification is noticed.  My proposed system
 > would not prevent the user from using the menu-driven configuration; it
 > would simple offer them a choice about whether to generate a new
 > configuration using the dialogs, or to preserve their existing configuration.
 > This choice would only be necessary if the file had been modified by hand.

  As far as I know, ucf is created exactly for this purpose; to mimic dpkg's
 conffile handing.  I assume you want to know if the configuration file is
 unmodified prior to asking all the debconf questions, and making use of such a
 command in the ucf package would unfortunately require a pre-dependency.
 However, such a test would be very simple (basically just checking if the
 md5sum of the configuration file matches the one recorded in ucf's hashfile),
 so it could easily be included in the config script.

  After you've conclusided that you can overwrite the configuration
 file (possibly by asking the user if the not modified check was
 negative), you just write the configuration file outside of /etc
 and call ucf on it.  Possibly with UCF_FORCE_CONFNEW if you've
 asked explicit permission.

  What am I missing?

-- 
Tore Anderson



Reply to: