#!/bin/sh
#
# This script is called from inside postinstall scriptlets at do_rootfs time. It
# actually adds, at the end, the list of packages for which the intercept script
# is valid. Also, if one wants to pass any variables to the intercept script from
# the postinstall itself, they will be added immediately after the shebang line.
#
# Usage: postinst_intercept <intercept_script_name> <package_name> <mlprefix=...> <var1=...> ... <varN=...>
# * intercept_script_name - the name of the intercept script we want to change;
# * package_name - add the package_name to list of packages the intercept script
# is used for;
# * mlprefix=... - this one is needed in order to have separate hooks for multilib.
# * var1=... - var1 will have the value we provide in the intercept script. This
# is useful when we want to pass on variables like ${libdir} to
# the intercept script;
#
[ $# -lt 3