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

Re: update-alternatives in maintainer's scripts



On Thu, 17 Jul 2003, Piotr Roszatycki wrote:

> I'd like to close bugs #38584, #181130. I just want to know how to call
> update-alternatives in maintainer's scripts. Should be only with 'configure'
> state for postinst and 'remove' for postrm? What is official policy for
> alternatives?

Ok, so what is correct?

In postinst:

 if [ "$1" == "configure" ]; then
	update-alternatives --install ...
 fi

or just:

 update-alternatives --install ...


In prerm:

 if [ "$1" == "remove" ]; then
	update-alternatives --remove ...
 fi

or just:

 update-alternatives --remove ...


What is the best common practices?

-- 
Piotr Roszatycki, Netia Telekom S.A.                    .''`.
mailto:Piotr_Roszatycki@netia.net.pl                   : :' :
mailto:dexter@debian.org                               `. `'
                                                         `-



Reply to: