On Wed, 6 Apr 2011, Piotr Sikora wrote: > Hi, > > > Otherwise you can end up with > > foobar(ok) > > when in fact the daemon failed to reload. > > We're ending up with $? = 0 from "reload" command anyway. > "daemon(ok/failed)" is only visual representation of that.
Exactly. But when I see a visual representation of OK, I assume it reloaded ok. > > So we have to choose between hundreds of daemons that are using the > > default or 8 that are not... hmm tough choice ;) > > There are only 60 daemons that use .rc scripts, not hundreds. Yet. > > The best compromise is to not print anything instead of printing what > > _may_ be true. > > But you are doing this already. You can get "foobar(ok)" from the "start" > command even if foo daemon fails to start later in the process (ports already > in use, etc). Yes and it was discussed and accepted because we do not want to rc_wait on startup. That is not a reason to have the same defect everywhere. Also during boot sequence, the rc scripts will probably not print anything (besides from the usual daemon name) anyway in a near future. > What about custom RC_RELOAD_OUTPUT variable that would print result for ports > with custom logic? Would that work for you? I would like to prevent adding knobs when at all possible. -- Antoine