New package for muninlite (http://sourceforge.net/projects/muninlite/), thx to Benoit
Signed-off-by: Beno?t Ganne <benoit.ganne at gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/packages@11236 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2d6cda2f69
commit
d9e54f90ff
55
admin/muninlite/Makefile
Normal file
55
admin/muninlite/Makefile
Normal file
@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=muninlite
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
||||
PKG_MD5SUM:=d8824bd98300fa6b1bf4aa6af08b7e39
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/muninlite
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
DEPENDS:=
|
||||
TITLE:=Munin node implemented in shell
|
||||
URL:=http://sourceforge.net/projects/muninlite/
|
||||
endef
|
||||
|
||||
define Package/muninlite/Default/description
|
||||
Munin node implemented in shell.
|
||||
Munin is a monitoring system for Unix networks.
|
||||
endef
|
||||
|
||||
define Package/muninlite/postinst
|
||||
#!/bin/sh
|
||||
grep -q '^munin[[:space:]]*stream' $${IPKG_INSTROOT}/etc/inetd.conf 2>/dev/null
|
||||
[ $$? -ne 0 ] && echo "munin stream tcp nowait root /usr/sbin/munin-node" >> $${IPKG_INSTROOT}/etc/inetd.conf
|
||||
grep -q '^munin[[:space:]]*4949/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null
|
||||
[ $$? -ne 0 ] && echo "munin 4949/tcp" >> $${IPKG_INSTROOT}/etc/services
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/muninlite/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,muninlite))
|
20
admin/muninlite/patches/001-no_disks.patch
Normal file
20
admin/muninlite/patches/001-no_disks.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -Naur muninlite-1.0.0/Makefile muninlite-1.0.0-openwrt/Makefile
|
||||
--- muninlite-1.0.0/Makefile 2007-06-15 14:00:12.000000000 +0200
|
||||
+++ muninlite-1.0.0-openwrt/Makefile 2008-05-13 14:15:47.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
-PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats
|
||||
-#PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats
|
||||
+#PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats
|
||||
+PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats
|
||||
|
||||
munin-node: plugins/*
|
||||
@VERSION=$$(cat VERSION); \
|
||||
@@ -43,4 +43,4 @@
|
||||
cd releases; \
|
||||
rm -rf muninlite-$$VERSION/releases; \
|
||||
tar zcvf muninlite-$$VERSION.tar.gz muninlite-$$VERSION >/dev/null; \
|
||||
- rm -rf muninlite-$$VERSION;
|
||||
\ No newline at end of file
|
||||
+ rm -rf muninlite-$$VERSION;
|
20
admin/muninlite/patches/002-add_ppp.patch
Normal file
20
admin/muninlite/patches/002-add_ppp.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -Naur muninlite-1.0.0/munin-node.in muninlite-1.0.0-openwrt/munin-node.in
|
||||
--- muninlite-1.0.0/munin-node.in 2007-06-11 20:30:26.000000000 +0200
|
||||
+++ muninlite-1.0.0-openwrt/munin-node.in 2008-05-13 14:14:25.000000000 +0200
|
||||
@@ -62,14 +62,14 @@
|
||||
for PLUG in $PLUGINS
|
||||
do
|
||||
if [ "$PLUG" = "if_" ]; then
|
||||
- for INTER in $(grep '^ *\(eth\|wlan\|ath\|ra\)[0-9]\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\)[0-9]\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
do
|
||||
RES="$RES if_$INTER"
|
||||
eval "fetch_if_${INTER}() { fetch_if $INTER $@; };"
|
||||
eval "config_if_${INTER}() { config_if $INTER $@; };"
|
||||
done
|
||||
elif [ "$PLUG" = "if_err_" ]; then
|
||||
- for INTER in $(grep '^ *\(eth\|wlan\|ath\|ra\)[0-9]\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\)[0-9]\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
do
|
||||
RES="$RES if_err_$INTER"
|
||||
eval "fetch_if_err_${INTER}() { fetch_if_err $INTER $@; };"
|
Loading…
x
Reference in New Issue
Block a user