Pierre Habouzit wrote: > On Tue, Aug 25, 2009 at 10:17:06PM +0100, Francis Russell wrote: >> Package: nsd3 >> Version: 3.2.2-1 >> Severity: normal >> >> >> It appears the notify, rebuild and update options in the nsd3 init.d script have no effect. > > You're simply wrong. They produce no output to the terminal when they > work, which is the desired effect.
Yes, I do understand that a working call to nsdc rebuild produces no output. Of course, the incorrect behaviour might be specific to my system. Here's what I'm seeing: f...@callisto:~$ stat -c "%z" /var/lib/nsd3/nsd.db && sudo /etc/init.d/nsd3 rebuild; stat -c "%z" /var/lib/nsd3/nsd.db 2009-08-26 01:47:10.000000000 +0100 2009-08-26 01:47:10.000000000 +0100 The file has not been updated. Placing echo statements in the init script, I see it terminates at the log_begin_msg call. I have to use ';' and not '&&' between the second and third statements because the nsd3 script exits with an error status. Compared to calling nsdc rebuild directly: f...@callisto:~$ stat -c "%z" /var/lib/nsd3/nsd.db && sudo nsdc rebuild && stat -c "%z" /var/lib/nsd3/nsd.db 2009-08-26 02:25:40.000000000 +0100 2009-08-26 02:25:41.000000000 +0100 >> I managed to track this down to the lack of a third parameter to ctl. >> This in turn seems to cause the script to terminate at the call to >> log_begin_msg. >> >> Modifying the line >> >> ctl nsd "$1" >> >> to >> >> ctl nsd "$1" "Performing $1..." >> >> seemed to fix it. > > No, it doesn't "fix" it, it produce useless output, making such a > command unsuitable for use from cron or similar. I'm confused. *Every* init script I've ever seen, even those with non-standard options produces formatted output specifically for the benefit of the user for debugging purposes. If someone doesn't want output in a cron job, they typically divert it to /dev/null. In addition, they could simply call nsdc directly, which produces no output. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

