Improvements in postinst and prerm scripts