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

Re: debconf and daemons



Michael Moerz <e9625136@student.tuwien.ac.at> wrote:
> doing a echo "key value" >> /etc/myfile is a rather evil approach (for
> reasons search the mailing list and/or debconf docu)
> better would be something like:
> 
> cat /etc/myfile | sed -e 's/key.*/key value/' >> /etc/myfile2
> mv /etc/myfile2 /etc/myfile
> 
> ( you could do that over /tmp too, to avoid cluttering /etc with files,
> but I leave that over for your imagination ... )

Be aware that using temporary files in world-writable directories (like
/tmp) can be a security hazard on multi-user machines (and in some other
situations also).
-- 
Sam Couter          |   Internet Engineer   |   http://www.topic.com.au/
sam@topic.com.au    |   tSA Consulting      |
OpenPGP key ID:       DE89C75C,  available on key servers
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C

Attachment: pgpKkWxgJsMBh.pgp
Description: PGP signature


Reply to: