In https://dev.java/learn/jvm/other-tools/jpackage/#examples section "Resource directory files considered only when building Linux DEB installer" says:
preinstall Pre-install shell script. Default resource is template.preinstall.
prerm Pre-remove shell script. Default resource is template.prerm.
postinstall Post-install shell script. Default resource is template.postinstall.
postrm Post-remove shell script. Default resource is template.postrm.
but these names are incorrect for (prefix)install scripts. Looking at openjdk repo: src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources
template.preinstall should be template.preinst, template.postinstall should be template.postinst and in consequence preinstall should be preinst and postinstall should be postinst.
I decided to verify this after creating a postinstall script in resource dir didn't work for me.
In https://dev.java/learn/jvm/other-tools/jpackage/#examples section "Resource directory files considered only when building Linux DEB installer" says:
but these names are incorrect for (prefix)install scripts. Looking at openjdk repo: src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources
template.preinstallshould betemplate.preinst,template.postinstallshould betemplate.postinstand in consequencepreinstallshould bepreinstandpostinstallshould bepostinst.I decided to verify this after creating a postinstall script in resource dir didn't work for me.