POSTIN
/bin/sh
# create it if it doesn't already exist as a link
# If it is an existing file other than a link, do nothing
[ -L /etc/imagefactory/plugins.d/EC2.info ] ||
[ -e /etc/imagefactory/plugins.d/EC2.info ] ||
ln -s /usr/lib/python2.7/site-packages/imagefactory_plugins/EC2/EC2.info /etc/imagefactory/plugins.d/EC2.info
exit 0
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
# clean up the link if it exists - if it doesn't or if this is a regular file, do nothing
[ -L /etc/imagefactory/plugins.d/EC2.info ] && rm -f /etc/imagefactory/plugins.d/EC2.info
fi
exit 0