On http://fedoraproject.org/wiki/PackagingGuidelines under "Running scriptlets only in certain situations" it gives an example:
This means that for example a package that installs an init script with the chkconfig command should uninstall it only on erase and not upgrade with the following snippet:
%postun if [ $1 -eq 0 ]; then /sbin/chkconfig --del %{name} fi
However, that example is incorrect. By the time %postun is run, the /etc/init.d/%{name} file is already gone. This needs to be run instead in %preun.
On Tue, 2005-03-15 at 18:08 -0500, Chuck R. Anderson wrote:
On http://fedoraproject.org/wiki/PackagingGuidelines under "Running scriptlets only in certain situations" it gives an example:
[...]
However, that example is incorrect. By the time %postun is run, the /etc/init.d/%{name} file is already gone. This needs to be run instead in %preun.
Fixed, thanks for the heads up.
packaging@lists.fedoraproject.org