[Pkg-net-snmp-commits] [SCM] Git repository for pkg-net-snmp branch, master, updated. debian/5.7.2_dfsg-5-5-g9c97387

Hideki Yamane henrich at debian.org
Sun May 19 23:04:08 UTC 2013


The following commit has been merged in the master branch:
commit 020a681ccee806a6adac6f4a1052132b0b21aad3
Author: Hideki Yamane <henrich at debian.org>
Date:   Mon May 20 08:01:46 2013 +0900

    merge Ubuntu's change
    
    Kill any/all processes owned by snmp user before install/uninstall.

diff --git a/debian/snmp.preinst b/debian/snmp.preinst
index 9dc3306..cc44658 100644
--- a/debian/snmp.preinst
+++ b/debian/snmp.preinst
@@ -1,18 +1,26 @@
-#! /bin/sh
+#!/bin/sh
 
 set -e
 
-action="$1"
+case "$1" in
 
-if [ "$action" = upgrade ]
-then
+install|upgrade)
   if [ -L /usr/share/doc/snmp ]; then
     rm -f /usr/share/doc/snmp
   fi
   if [ -d /usr/doc/snmp ]; then
     rm -rf /usr/doc/snmp
   fi
-fi
+
+  killall -u snmp 2>/dev/null || true
+
+  ;;
+abort-upgrade)
+  ;;
+
+*)
+  echo "preinst called with unknown argument \`$1'" >&2
+  exit 1
 
 #DEBHELPER#
 
diff --git a/debian/snmp.prerm b/debian/snmp.prerm
new file mode 100644
index 0000000..a02114d
--- /dev/null
+++ b/debian/snmp.prerm
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+    killall -u snmp  2>/dev/null || true
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0

-- 
Git repository for pkg-net-snmp



More information about the Pkg-net-snmp-commits mailing list