[arch-commits] CVS update of extra/network/net-snmp (PKGBUILD snmpd.rc)

Eric Belanger eric at archlinux.org
Wed Oct 10 00:56:45 UTC 2007


    Date: Tuesday, October 9, 2007 @ 20:56:45
  Author: eric
    Path: /home/cvs-extra/extra/network/net-snmp

Modified: PKGBUILD (1.4 -> 1.5) snmpd.rc (1.1 -> 1.2)

upgpkg: net-snmp 5.4.1-2
installed perl modules in correct directory (closes FS#8233), fixed restart function of daemon script


----------+
 PKGBUILD |   15 ++++++++++-----
 snmpd.rc |   47 ++++++++++++++++++++---------------------------
 2 files changed, 30 insertions(+), 32 deletions(-)


Index: extra/network/net-snmp/PKGBUILD
diff -u extra/network/net-snmp/PKGBUILD:1.4 extra/network/net-snmp/PKGBUILD:1.5
--- extra/network/net-snmp/PKGBUILD:1.4	Mon Sep 10 00:49:37 2007
+++ extra/network/net-snmp/PKGBUILD	Tue Oct  9 20:56:45 2007
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD,v 1.4 2007/09/10 04:49:37 eric Exp $
+# $Id: PKGBUILD,v 1.5 2007/10/10 00:56:45 eric Exp $
 # Maintainer: Dale Blount <dale at archlinux.org>
 
 pkgname=net-snmp
 pkgver=5.4.1
-pkgrel=1
+pkgrel=2
 pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
 arch=('i686' 'x86_64')
 url="http://www.net-snmp.org/"
@@ -13,7 +13,8 @@
 options=('!libtool' '!makeflags' '!emptydirs')
 source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz \
 	snmpd.rc)
-md5sums=('6c974df7a5a5b1579f72115e6b045bda' '7b31f2f3b363a78c7659ece209c0ebf8')
+md5sums=('6c974df7a5a5b1579f72115e6b045bda' '9f0d13676ba1fae1eb7eb178edd85b43')
+sha1sums=('ac5ba033c10d53d3057415121f8c4936c643c208' '2c679b564a2c319d9ce2714a9776aa0e6d89c60a')
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
@@ -22,9 +23,13 @@
 	--with-default-snmp-version="3" --with-sys-contact="root at localhost" \
 	--with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" \
 	--with-persistent-directory="/var/net-snmp" 
-  make INSTALLARCHLIB=/usr/lib/perl5/current/${archname} \
+  make || return 1
+# fix Makefile for perl modules
+  cd perl && perl Makefile.PL \
+  INSTALLARCHLIB=/usr/lib/perl5/current/${archname} \
        INSTALLSITELIB=/usr/lib/perl5/site_perl/current \
-       INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} || return 1
+       INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} 
+  cd ..
   make DESTDIR=$startdir/pkg INSTALL_PREFIX=$startdir/pkg install
   install -D -m755 $startdir/src/snmpd.rc $startdir/pkg/etc/rc.d/snmpd || return 1
   install -D -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
Index: extra/network/net-snmp/snmpd.rc
diff -u extra/network/net-snmp/snmpd.rc:1.1 extra/network/net-snmp/snmpd.rc:1.2
--- extra/network/net-snmp/snmpd.rc:1.1	Wed Aug 30 17:19:18 2006
+++ extra/network/net-snmp/snmpd.rc	Tue Oct  9 20:56:45 2007
@@ -4,40 +4,33 @@
 . /etc/rc.d/functions
 
 PID=`pidof -o %PPID /usr/sbin/snmpd`
-
-start() {
-  stat_busy "Starting Net-SNMP"
-  [ -z "$PID" ] && /usr/sbin/snmpd
-  if [ $? -gt 0 ]; then
-    stat_fail
-  else
-    add_daemon snmpd
-    stat_done
-  fi
-}
-
-stop() {
-  stat_busy "Stopping Net-SNMP"
-  [ ! -z "$PID" ]  && kill $PID &> /dev/null
-  if [ $? -gt 0 ]; then
-    stat_fail
-  else
-    rm_daemon snmpd
-    stat_done
-  fi
-}
-
 case "$1" in
   start)
-    start
+    stat_busy "Starting Net-SNMP"
+    [ -z "$PID" ] && /usr/sbin/snmpd
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      echo $PID > /var/run/snmpd.pid
+      add_daemon snmpd
+      stat_done
+    fi
     ;;
   stop)
-    stop
+    stat_busy "Stopping Net-SNMP"
+    [ ! -z "$PID" ]  && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm /var/run/snmpd.pid
+      rm_daemon snmpd
+      stat_done
+    fi
     ;;
   restart)
-    stop
+    $0 stop
     sleep 2
-    start
+    $0 start
     ;;
   *)
     echo "usage: $0 {start|stop|restart}"  




More information about the arch-commits mailing list