packages/zabbix: use new service functions, various other zabbix-agent fixes:
[packages.git] / admin / zabbix / Makefile
index 7fd99a5..028ded1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
 PKG_VERSION:=1.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
@@ -75,44 +75,6 @@ define Package/zabbix-agent/install
        $(INSTALL_BIN) ./files/zabbix_agentd.init $(1)/etc/init.d/zabbix_agentd
 endef
 
-define Package/zabbix-agent/postinst
-#!/bin/sh
-
-name=zabbix
-id=53
-
-# do not change below
-# check if we are on real system
-if [ -z "$${IPKG_INSTROOT}" ]; then
-       # create copies of passwd and group, if we use squashfs
-       rootfs=`mount |awk '/root/ { print $$5 }'`
-       if [ "$$rootfs" = "squashfs" ]; then
-               if [ -h /etc/group ]; then
-                       rm /etc/group
-                       cp /rom/etc/group /etc/group
-               fi
-               if [ -h /etc/passwd ]; then
-                       rm /etc/passwd
-                       cp /rom/etc/passwd /etc/passwd
-               fi
-       fi
-
-       echo ""
-       if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
-               echo "adding group $$name to /etc/group"
-               echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group
-       fi
-
-       if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
-               echo "adding user $$name to /etc/passwd"
-               echo "$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd
-       fi
-
-       chown $${name} $${IPKG_INSTROOT}/etc/zabbix/zabbix_agentd.conf
-fi
-
-endef
-
 define Package/zabbix-sender/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_sender $(1)/usr/sbin/