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

$1 in %pre, post, preun, postun



Hi,

I am using RPM 4.0.3. I happened to find that the %pre, %post, %preun and
%postun are called with $1 as 0, 1 or 2 depending upon the kind of rpm
installation command i.e. whether its Upgrade or a fresh installation or so.
I could not find any documentation on the net that mentions this.
Hence I wanted to know if I can safely use these values in these scripts. Is
there any possibility that the meanings of these would change in future RPM
versions?

Currently I have included a mypackage-release file for my package to know if
its upgrade or a fresh installation. But would replace it with checking of
$1 in the scriptlets if found advisable.

Thanks in advance.

Regards,
Bharavi.





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