passing a parameter into dpkg -i?

debian, dpkg, installation, parameters

Solution

No, you cannot pass a parameter that way.

You can set an environmental variable this way

$ VARIABLE=foo dpkg --install package.deb

or (much better) use debconf to ask questions to the user.

Problem

Is there any way to pass a parameter into dpkg -i that can then be used by preinst and postinst? I've looked into this and was wondering if I could refer to these parameters with $1 or $2 Thanks in advance

Original source