Hi expertise, I’m a newbie in RPM. I’m working on creating a RPM package which only one instance is allowed to install on users machine. Then I need to check whether there is other version of the software installed on the machine before installation (I’m writing some scripts in %pre section). Then I use the $1 variable to check for it. But I notice that no matter the user is running “rpm -i” command or “rpm -U”, $1 will always return 2 (if there is already one instance installed on the machine). But in fact I only need to stop the user when he’s running “rpm -i”, because “rpm -U” will remove the old versions after install. Then my question is, how can I know which command (“rpm -i” or “rpm -U”) the user is using in the rpm spec? Or do you have any other suggestion to this solution? Best Regards, Wendy Zheng |
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list