packaging: improve post/postun scripts