On Wed, 6 Apr 2011, Piotr Sikora wrote: > Hi, > > > This doesn't usually indicate that the reload was successful, > > just that you were able to send the process a SIGHUP. As such I think > > printing "ok" here gives a false sense of security. > > Yes and no... Some daemons, like nginx, have custom rc_reload command that > actually does useful stuff and sanity checking. > > Example: > # /etc/rc.d/nginx reload > nginx(failed) > > # RC_DEBUG=1 /etc/rc.d/nginx reload > doing rc_check > doing rc_reload > [emerg]: unknown directive "test" in /etc/nginx/nginx.conf:1 > nginx(failed) > > Without "nginx(failed)" output, most people would assume that nginx reloaded > successfully. > > Granted, there are only 8 ports with custom rc_reload logic, but why should > they suffer?
Because they divide from default. Otherwise you can end up with foobar(ok) when in fact the daemon failed to reload. So we have to choose between hundreds of daemons that are using the default or 8 that are not... hmm tough choice ;) The best compromise is to not print anything instead of printing what _may_ be true. -- Antoine
