#!/bin/bash # analog of %post/%posttrans RPM scriptlet # For details see: # 1. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called # 2. https://www.debian.org/doc/debian-policy/ap-flowcharts.html # Arguments in short: # "$1" == "configure" - RPM post/posttrans # "$1" == "abort-upgrade" - upgrade package error # "$1" == "abort-remove" - remove package error # "liblve0 DEBIAN POSTINST STARTED" echo "$@" rhel=8 case "$1" in configure) # NOTE: DEB Package Manager fails on any scriptlet error, so we mute them [[ -z "$2" ]] && upgrade_arg="install" || upgrade_arg="upgrade" # RPM post.sh /usr/share/lve/scriptlets/liblve/rpm_post.sh "$upgrade_arg" $rhel || true ;; *) ;; esac # "liblve0 DEBIAN POSTINST FINISHED" exit 0