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

  Server: cvs.openpkg.org                  Name:   Michael van Elst
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   18-Jul-2003 17:14:18
  Branch: HEAD                             Handle: 2003071816141601

  Modified files:
    openpkg-src/dhcpd       dhcpd.spec rc.dhcpd
    openpkg-web             news.txt

  Log:
    %status and pidfile handling

  Summary:
    Revision    Changes     Path
    1.43        +1  -1      openpkg-src/dhcpd/dhcpd.spec
    1.9         +18 -9      openpkg-src/dhcpd/rc.dhcpd
    1.5650      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/dhcpd/dhcpd.spec
  ============================================================================
  $ cvs diff -u -r1.42 -r1.43 dhcpd.spec
  --- openpkg-src/dhcpd/dhcpd.spec      17 Jul 2003 15:32:36 -0000      1.42
  +++ openpkg-src/dhcpd/dhcpd.spec      18 Jul 2003 15:14:17 -0000      1.43
  @@ -33,7 +33,7 @@
   Group:        DNS
   License:      ISC/BSD
   Version:      3.0.1rc11
  -Release:      20030717
  +Release:      20030718
   
   #   list of sources
   Source0:      ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/dhcpd/rc.dhcpd
  ============================================================================
  $ cvs diff -u -r1.8 -r1.9 rc.dhcpd
  --- openpkg-src/dhcpd/rc.dhcpd        17 Jul 2003 21:34:38 -0000      1.8
  +++ openpkg-src/dhcpd/rc.dhcpd        18 Jul 2003 15:14:17 -0000      1.9
  @@ -6,27 +6,36 @@
   %config
       dhcpd_enable="$openpkg_rc_def"
   
  +%common
  +    dhcpd_pidfile="@l_prefix@/var/dhcpd/dhcpd.pid"
  +    dhcpd_signal () {
  +        [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile`
  +    }
  +
  +%status -p 200 -u @l_susr@ -o
  +    dhcpd_usable="unknown"
  +    dhcpd_active="no"
  +    opService dhcpd enable yes && \
  +        dhcpd_signal 0 && dhcpd_active="yes"
  +    echo "dhcpd_enable=\"$dhcpd_enable\""
  +    echo "dhcpd_usable=\"$dhcpd_usable\""
  +    echo "dhcpd_active=\"$dhcpd_active\""
  +
   %start -p 200 -u @l_susr@
       opService dhcpd enable yes || exit 0
       @l_prefix@/sbin/dhcpd >/dev/null 2>&1
   
   %stop -p 200 -u @l_susr@
       opService dhcpd enable yes || exit 0
  -    if [ -f @l_prefix@/var/dhcpd/dhcpd.pid ]; then
  -        kill -TERM `cat @l_prefix@/var/dhcpd/dhcpd.pid`
  -    fi
  +    dhcpd_signal TERM
   
   %restart -u @l_susr@
       opService dhcpd enable yes || exit 0
  -    if [ -f @l_prefix@/var/dhcpd/dhcpd.pid ]; then
  -        kill -TERM `cat @l_prefix@/var/dhcpd/dhcpd.pid`
  -    fi
  +    dhcpd_signal TERM
       sleep 2
       @l_prefix@/sbin/dhcpd >/dev/null 2>&1
   
   %reload -u @l_susr@
       opService dhcpd enable yes || exit 0
  -    if [ -f @l_prefix@/var/dhcpd/dhcpd.pid ]; then
  -        kill -HUP `cat @l_prefix@/var/dhcpd/dhcpd.pid`
  -    fi
  +    dhcpd_signal HUP
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5649 -r1.5650 news.txt
  --- openpkg-web/news.txt      18 Jul 2003 14:49:12 -0000      1.5649
  +++ openpkg-web/news.txt      18 Jul 2003 15:14:16 -0000      1.5650
  @@ -1,3 +1,4 @@
  +18-Jul-2003: Upgraded package: P<dhcpd-3.0.1rc11-20030718>
   18-Jul-2003: Upgraded package: P<bind8-8.4.1-20030718>
   18-Jul-2003: Upgraded package: P<openpkg-tool-20030718-20030718>
   18-Jul-2003: Upgraded package: P<qpopper-4.0.5-20030718>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to