Hi,

On Thu, Apr 02, 2009 at 08:50:34PM +0200, Julien BLACHE wrote:
> Alexander Kurtz <kurtz.a...@googlemail.com> wrote:
> > How about a simple patch in the postinst file? See attachement.
> 
> Too simple to be policy-compliant :) If you want to do that, you need
> to use debconf and follow the best-practices for this job.

chrony from etch (and lenny) has the following in its postinst:

| if [ -z "$2" ] ; then
| 
| # As this a new install generate a key.  Remove any keyfile left by a failed 
ins
| tall.
|     rm -rf /etc/chrony/chrony.keys
|     KEYFILE=`tempfile -m 640 -n /etc/chrony/chrony.keys`
|     PASSWORD=`head -c 8 /dev/urandom | tr '\0-\377' 
'a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9@@@@####'`
|     echo "1 $PASSWORD" > $KEYFILE

It then uses ucf at the end of the file. But since I'm not a DD, I don't know
how much not policy-compliant and how far away from best practices it is. :)

Greetings,
 Mike Dornberger



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to