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

Re: Bug#688736: w3c-linkchecker: modifies conffiles (policy 10.7.3): /etc/w3c/checklink.conf

Ivan Shmakov <oneingray@gmail.com> writes:

> 	What bothers me more, however, is that the ${CFG_TMP} filename
> 	bears an utterly generic “.tmp” suffix, and should, for one
> 	reason or another, such a filename exist at the time .postinst
> 	is run, we're going to silently overwrite it.

> 	Thus, my preference would be to use mktemp(1), e. g.:

>    +        CFG_TMP=$(mktemp -- /etc/w3c/.checklink.conf.XXXXXXXX)

> 	TIA.

Another standard approach here is to use .dpkg-new, which is used by dpkg
for conffiles for a similar purpose and which local administrators are
therefore used to seeing if it gets left behind for some reason.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: