I am not sure if the repair stuff for the boot environment is still needed in
preinst. I think it was to upgrade the file structure from a really old version (af123 would know more).
I suggest a postrm script as well to remind people to reboot after removal. Otherwise nothing happens if you try to access the portal after it has been removed (i.e it doesn't revert to the default portal until it has been rebooted).
e.g. (from portal-xtra1)
Code:
#!/bin/sh
echo "."
echo "."
echo "!! IMPORTANT !!"
echo "-------------------------------------------"
echo "You will need to reboot your Humax."
echo "-------------------------------------------"
echo "Power off, wait until the hard drive powers"
echo "down - indicated by a small click."
echo "Then power back on, and voila... ...enjoy"
echo "-------------------------------------------"
exit 0
PS. It seems to work fine