Changeset 11976


Ignore:
Timestamp:
2008-07-28T21:34:31+02:00 (10 years ago)
Author:
blogic
Message:

bumps vnstat to 1.6 and add uci files

Location:
packages/net/vnstat
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/vnstat/Makefile

    r9349 r11976  
    1010 
    1111PKG_NAME:=vnstat 
    12 PKG_VERSION:=1.4 
     12PKG_VERSION:=1.6 
    1313PKG_RELEASE:=1 
    1414 
    1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1616PKG_SOURCE_URL:=http://humdi.net/vnstat 
    17 PKG_MD5SUM:=9184f79b5e60499bc059f670032291e5 
     17PKG_MD5SUM:=ccaffe8e70d47e0cf2f25e52daa25712 
    1818 
    1919PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     
    3535endef 
    3636 
     37define Package/vnstat/conffiles 
     38/etc/config/vnstat 
     39endef 
     40 
    3741define Build/Compile 
    3842        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     
    4448        $(INSTALL_DIR) $(1)/usr/bin 
    4549        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/vnstat $(1)/usr/bin/ 
     50        $(INSTALL_DIR) $(1)/etc/config 
     51        $(INSTALL_DATA) ./files/vnstat.conf $(1)/etc/config/vnstat 
     52        $(INSTALL_DIR) $(1)/etc/init.d 
     53        $(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat 
     54endef 
     55 
     56define Package/vnstat/postinst 
     57#!/bin/sh 
     58BIN=$${IPKG_INSTROOT}/usr/bin/vnstat 
     59CRONTAB=$${IPKG_INSTROOT}/etc/crontabs/root 
     60LIB_D=$${IPKG_INSTROOT}/var/lib/vnstat 
     61mkdir -p $${IPKG_INSTROOT}/etc/crontabs/ 
     62[ -d $$LIB_D ] || mkdir -p $$LIB_D 
     63IFACE_WAN=$$(uci get network.wan.ifname) 
     64if [ -n $$IFACE_WAN ]; then 
     65        [ -e $$LIB_D/$$IFACE_WAN ] || ( [ -x $$BIN ] && $$BIN -u -i $$IFACE_WAN ) 
     66fi 
     67grep -q "$$BIN -u" $$CRONTAB 2>/dev/null 
     68[ $$? -ne 0 ] && echo "0-55/5 *   * * *   root    if [ -x $$BIN ] && [ \`ls $$LIB_D | wc -l\` -ge 1 ]; then $$BIN -u; fi" >> $$CRONTAB 
     69true 
    4670endef 
    4771 
Note: See TracChangeset for help on using the changeset viewer.