OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   22-Jul-2003 15:33:36
  Branch: HEAD                             Handle: 2003072214333600

  Modified files:
    openpkg-src/bind        bind.spec named.conf rc.bind

  Log:
    PR#202 run-time check and related issues

  Summary:
    Revision    Changes     Path
    1.68        +12 -10     openpkg-src/bind/bind.spec
    1.4         +1  -1      openpkg-src/bind/named.conf
    1.18        +16 -8      openpkg-src/bind/rc.bind
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/bind/bind.spec
  ============================================================================
  $ cvs diff -u -r1.67 -r1.68 bind.spec
  --- openpkg-src/bind/bind.spec        22 Jul 2003 08:10:40 -0000      1.67
  +++ openpkg-src/bind/bind.spec        22 Jul 2003 13:33:36 -0000      1.68
  @@ -235,17 +235,19 @@
           ) | %{l_rpmtool} msg -b -t notice
           $RPM_INSTALL_PREFIX/sbin/rndc-confgen -a
           chown %{l_musr}:%{l_mgrp} $RPM_INSTALL_PREFIX/etc/bind/rndc.key
  -    elif [ $1 -gt 1 ]; then
  -        #   reload daemon
  -        $RPM_INSTALL_PREFIX/sbin/rndc reload >/dev/null 2>&1 || true
       fi
   
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} bind status 2>/dev/null`
  +    [ ".$bind_active" = .yes ] && %{l_rc} bind restart
  +    exit 0
  +
   %preun
  -    if [ $1 -eq 0 ]; then
  -        #   stop daemon
  -        $RPM_INSTALL_PREFIX/sbin/rndc stop >/dev/null 2>&1 || true
  -        #   remove dynamically generated files
  -        rm -f $RPM_INSTALL_PREFIX/etc/bind/rndc.key
  -        rm -f $RPM_INSTALL_PREFIX/var/bind/*
  -    fi
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} bind stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/etc/bind/rndc.key
  +    rm -f $RPM_INSTALL_PREFIX/var/bind/*
  +    exit 0
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/bind/named.conf
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 named.conf
  --- openpkg-src/bind/named.conf       3 Dec 2002 14:03:29 -0000       1.3
  +++ openpkg-src/bind/named.conf       22 Jul 2003 13:33:36 -0000      1.4
  @@ -34,7 +34,7 @@
       transfer-format      one-answer;
       cleaning-interval    60;
       interface-interval   60;
  -    #listen-on           port 53 { 127.0.0.1; };
  +    listen-on            port 53 { 127.0.0.1; };
       #query-source        address 127.0.0.1 port *;
       #transfer-source     127.0.0.1;
       #notify-source       127.0.0.1;
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/bind/rc.bind
  ============================================================================
  $ cvs diff -u -r1.17 -r1.18 rc.bind
  --- openpkg-src/bind/rc.bind  22 Jul 2003 08:10:40 -0000      1.17
  +++ openpkg-src/bind/rc.bind  22 Jul 2003 13:33:36 -0000      1.18
  @@ -6,8 +6,10 @@
   %config
       bind_enable="$openpkg_rc_def"
       bind_flags=""
  -    bind_log_numfiles="5"
  -    bind_log_minsize="512K"
  +    bind_log_prolog="true"
  +    bind_log_epilog="true"
  +    bind_log_numfiles="10"
  +    bind_log_minsize="1M"
       bind_log_complevel="9"
   
   %status -u @l_susr@ -o
  @@ -21,27 +23,33 @@
   
   %start -p 100 -u @l_susr@
       rcService bind enable yes || exit 0
  +    rcService bind active yes && exit 0
       @l_prefix@/sbin/named ${bind_flags}
   
   %stop -p 100 -u @l_susr@
       rcService bind enable yes || exit 0
  +    rcService bind active no  && exit 0
       @l_prefix@/sbin/rndc stop
  +    sleep 2
   
   %restart -p 100 -u @l_susr@
       rcService bind enable yes || exit 0
  -    @l_prefix@/sbin/rndc stop
  -    sleep 1
  -    @l_prefix@/sbin/named ${bind_flags}
  +    rcService bind active no  && exit 0
  +    rc bind stop start
   
   %reload -p 100 -u @l_susr@
       rcService bind enable yes || exit 0
  +    rcService bind active no  && exit 0
       @l_prefix@/sbin/rndc reload
   
   %daily -u @l_susr@
       rcService bind enable yes || exit 0
  +
  +    #   rotate logfile
       shtool rotate -f \
  -        -n ${bind_log_numfiles} -s ${bind_log_minsize} \
  -        -d -z ${bind_log_complevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
  -        -E '@l_prefix@/sbin/rndc reload' \
  +        -n ${bind_log_numfiles} -s ${bind_log_minsize} -d \
  +        -z ${bind_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
  +        -P "${bind_log_prolog}" \
  +        -E "${bind_log_epilog} && rc bind reload" \
           @l_prefix@/var/bind/named.log
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to