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

Re: use and abuse of debconf



>> Joey Hess <joeyh@debian.org> writes:

 > #!/bin/sh -e
 > . /usr/share/debconf/confmodule
 > db_get foo/question
 > if [ ! -e "/etc/foo" ]; then
 > 	echo "# Configuration for foo" > /etc/foo
 > 	echo "# Helpful comment here" >> /etc/foo
 > 	echo "QUESTION=$RET" >> /etc/foo
 > else
 > 	sed -e "s/QUESTION=.*/QUESTION=$RET/" < /etc/foo > /etc/foo.new
 > 	mv -f /etc/foo.new /etc/foo
 > fi

 Did I miss something or will this really overwrite the value of
 QUESTION in /etc/foo every time the postinst is called?

--
Marcelo



Reply to: