Bug 63 - nsdc update and zonec are too tallkative
nsdc update and zonec are too tallkative
Status: CLOSED FIXED
Product: NSD
Classification: Unclassified
Component: Zonec Code
1.2.0
All Linux
: P2 minor
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-18 10:50 CEST by Stephane Bortzmeyer
Modified: 2003-10-30 16:07 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Bortzmeyer 2003-07-18 10:50:23 CEST
By defaut, 'nsdc update 'talks too mucch, making it unsuitable for mailing its
output (or appending it to a log file).

I suggest the following:

1) A patch to nsdc to allow a ZONEC_VERBOSE option is nsdc.conf:

*** nsd-1.2.1-orig/nsdc.sh.in   Thu Jun 12 14:31:18 2003
--- nsd-1.2.1-AFNIC/nsdc.sh.in  Fri Jul 18 10:00:37 2003
***************
*** 1,4 ****
! #!/bin/sh
  #
  # $Id: nsdc.sh.in,v 1.26 2003/06/12 12:31:18 erik Exp $
  #
--- 1,4 ----
! #!@shell@
  #
  # $Id: nsdc.sh.in,v 1.26 2003/06/12 12:31:18 erik Exp $
  #
***************
*** 58,63 ****
--- 58,65 ----
  namedxfer="@namedxfer@"
  pidfile="@pidfile@"
  
+ ZONEC_VERBOSE=-v
+ 
  #
  # Read in configuration file if any
  #
***************
*** 99,105 ****
        signal "0"
        ;;
  rebuild)
!       ${sbindir}/zonec -v -d ${zonesdir} -f ${dbfile}.$$ ${zonesfile} && mv
${dbfile}
.$$ ${dbfile}
        result=$?
        [ $result != 0 ] && echo "${dbfile} is unmodified"
        rm -f ${dbfile}.$$
--- 101,107 ----
        signal "0"
        ;;
  rebuild)
!       ${sbindir}/zonec ${ZONEC_VERBOSE} -d ${zonesdir} -f ${dbfile}.$$
${zonesfile} &
& mv ${dbfile}.$$ ${dbfile}
        result=$?
        [ $result != 0 ] && echo "${dbfile} is unmodified"
        rm -f ${dbfile}.$$

*** nsd-1.2.1-orig/nsdc.conf.sample     Fri Jul 18 10:47:58 2003
--- nsd-1.2.1-AFNIC/nsdc.conf.sample    Fri Jul 18 10:00:47 2003

! # Verbosity of "nsdc update". Set ZONEC_VERBOSE to -v or to a null string
! # ZONEC_VERBOSE=-v

2) zonec, even without -v says too many things ("zonec: reading zone "nom.re.":
0 errors"): such messages should not appear when -v is not used.
Comment 1 Erik Rozendaal 2003-07-21 12:23:56 CEST
Zonec now supports multiple -v options for different levels of verbosity. 
Default is now to only print errors and the total error count.
Comment 2 Miek Gieben 2003-07-21 12:25:18 CEST
What about -v (version) for zonec then? 
Comment 3 Erik Rozendaal 2003-07-21 12:27:50 CEST
Zonec was already using -v for verbosity.  I just extended the functionality. 
We'll have to work on standardizing the supported options.  Maybe -v should be
replaced by --version when we support long options (and then -v always means
verbose).
Comment 4 Miek Gieben 2003-07-21 12:31:26 CEST
Hmpf, did not look at zonec when I send the -v patch for nsd (was too lazy). But we are now 
not even consistent inside NSD... 
 
I vote yes on long options then and revamped this a little bit. Reopen the bug and make 
it dependend on then need-long-options-bug?