I have two problems that I would like to find a solution for:
I rename the munin 2.0 package and I have to obsolete the original munin packages in the SPEC file for RPM.
When replacing the existing 1.x munin package as part of the postun munin-node scripts, it removes the munin user.
postuninstall scriptlet (using /bin/sh): if [ $1 -eq 0 ]; then /usr/sbin/userdel munin || logger -t munin/rpm "User \"munin\" could not be deleted."
When I replace the existing munin 2.0 package, postun deletes the contents of the plugin directory.
postuninstall scriptlet (using /bin/sh): if [ "$1" = "0" ]; then [ -d /etc/munin/plugins ] && \ find /etc/munin/plugins/ -maxdepth 1 -type l -print0 | \ xargs -0 rm || : fi
Since yum installs a new package and then runs messages for the old package and $1 = 0 , in both cases it runs scripts after installing rpms. Is there any way around this?
user2245956
source share