Skip to content

Commit

Permalink
deb: drop compatible symlink when no upgrade mode (#553)
Browse files Browse the repository at this point in the history
Before:

v4 => v5 => upgrading... it will remove cpmpatible symlinks => v5.x

After:

v4 => v5 => upgrading... do not remove compatible symlinks => v5.x

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys authored Jul 27, 2023
1 parent aa964d9 commit c7e524b
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ if [ "$1" = "purge" ]; then
userdel --remove --force <%= compat_service_name %>
fi
fi
if [ -h /usr/sbin/<%= compat_service_name %> ]; then
rm -f /usr/sbin/<%= compat_service_name %>
fi
if [ -h /usr/sbin/<%= compat_service_name %>-gem ]; then
rm -f /usr/sbin/<%= compat_service_name %>-gem
if [ ! "$1" = "upgrade" ]; then
if [ -h /usr/sbin/<%= compat_service_name %> ]; then
rm -f /usr/sbin/<%= compat_service_name %>
fi
if [ -h /usr/sbin/<%= compat_service_name %>-gem ]; then
rm -f /usr/sbin/<%= compat_service_name %>-gem
fi
fi

#DEBHELPER#

0 comments on commit c7e524b

Please sign in to comment.