Hi Vincent, On Sat, Dec 13, 2008 at 02:40:54PM +0100, Vincent Bernat wrote: > OoO Peu avant le début de l'après-midi du samedi 13 décembre 2008, vers > 13:24, Tiago Bortoletto Vaz <[email protected]> disait : > > > For apache installation with a valid SSL certificate it's bad having to type > > the key when removing roundcube. Sometimes the admin with credentials to > > remove > > the package is not the one who has the certificate key. Also, it's a problem > > for massive and/or automatic removal processes. So, is it possible to have a > > "reload" instead of "restart" call in postrm script? > > There is no real need to use restart. reload should be OK. However, > invoke-rc.d does not understand "reload" and will call it even when the > service is disabled. This is against the policy, hence the use of > restart. restart is not done when the service is disabled.
Sorry but I couldn't find where Policy says it's not allowed, once reload wont be nocive when the service is disabled. I've seen several packages reloading rather than restarting the webserver on their scripts. The only special care is about redirecting fd 3 to /dev/null in order to have it "talking" to debconf and avoid the issue #446324. > Maybe we can hack around to check if the service is running before > issuing a reload. Please take a look in the attached patch and consider it if sounds ok for you. Actually I'm not completly sure about this issue, so please let me know if I'm wrong. Thanks, -- Tiago Bortoletto Vaz http://tiagovaz.org 0xA504FECA - http://pgp.mit.edu GNU/Linux user #188687
diff -ur roundcube-0.1.1/debian/roundcube-core.postinst roundcube-0.1.1.new/debian/roundcube-core.postinst
--- roundcube-0.1.1/debian/roundcube-core.postinst 2008-12-15 10:05:08.000000000 -0300
+++ roundcube-0.1.1.new/debian/roundcube-core.postinst 2008-12-15 10:42:56.091017545 -0300
@@ -151,10 +151,12 @@
if [ "$res" = "true" ]; then
for webserver in $restart; do
webserver=${webserver%,}
+ # Redirection of 3 is needed because Debconf uses it and it might
+ # be inherited by webserver. See bug #446324.
if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d $webserver restart
+ invoke-rc.d $webserver reload 3>/dev/null || true
else
- /etc/init.d/$webserver restart
+ /etc/init.d/$webserver reload 3>/dev/null || true
fi
done
fi
diff -ur roundcube-0.1.1/debian/roundcube-core.postrm roundcube-0.1.1.new/debian/roundcube-core.postrm
--- roundcube-0.1.1/debian/roundcube-core.postrm 2008-12-15 10:05:08.000000000 -0300
+++ roundcube-0.1.1.new/debian/roundcube-core.postrm 2008-12-15 10:43:54.924137956 -0300
@@ -73,10 +73,12 @@
if [ "$res" = "true" ]; then
for webserver in $restart; do
webserver=${webserver%,}
+ # Redirection of 3 is needed because Debconf uses it and it might
+ # be inherited by webserver. See bug #446324.
if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d $webserver restart
+ invoke-rc.d $webserver reload 3>/dev/null || true
else
- /etc/init.d/$webserver restart
+ /etc/init.d/$webserver reload 3>/dev/null || true
fi
done
fi
signature.asc
Description: Digital signature

