Skip to content

Commit

Permalink
Overwrite existing symlinks on RPM upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 committed Nov 13, 2024
1 parent d3884fe commit be163b6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/rpm/scriptlets.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
post_install_script = '''
#!/bin/bash -e
if [ $1 -eq 1 ] ; then
# Initial installation
# Create symbolic links
ln -s /usr/bin/dnst /usr/bin/ldns-nsec3-hash
FORCE=
if [ $1 -eq 2 ]; then
# Upgrade
FORCE=-f
fi
# Create symbolic links
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-nsec3-hash
'''

post_uninstall_script = '''
#!/bin/bash -e
#RPM_SYSTEMD_MACROS#
if [ $1 -ge 1 ] ; then
if [ $1 -eq 0 ] ; then
# Uninstallation
# Remove symbolic links
rm -f /usr/bin/ldns-nsec3-hash
fi
Expand Down

0 comments on commit be163b6

Please sign in to comment.