mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Fix to skip uninstall when package is replaced by rename
*Note: This is to support clean upgrade and replacement of wbm-* → webmin-* modules
This commit is contained in:
@@ -551,6 +551,9 @@ if [ "$istheme" = "1" -a "\$1" = "0" ]; then
|
||||
fi
|
||||
# Run the pre-uninstall script, if we are not upgrading
|
||||
if [ "$prog" = "webmin" -a "\$1" = "0" -a -r "/usr/libexec/$prog/$mod/uninstall.pl" ]; then
|
||||
# Skip if replaced by a different package (wbm-foo - webmin-foo)
|
||||
owner=\$(rpm -qf --qf '%%{NAME}\\n' "/usr/libexec/$prog/$mod/uninstall.pl" 2>/dev/null || true)
|
||||
[ -n "\$owner" -a "\$owner" != "%{name}" ] && exit 0
|
||||
cd /usr/libexec/$prog
|
||||
WEBMIN_CONFIG=/etc/$prog WEBMIN_VAR=/var/$prog /usr/libexec/$prog/run-uninstalls.pl $mod
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user