Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

passing a parameter into dpkg -i?

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

like image 616
user1553248 Avatar asked Aug 28 '12 20:08

user1553248


1 Answers

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.

like image 181
InternetSeriousBusiness Avatar answered Nov 27 '22 12:11

InternetSeriousBusiness