From ca4bdeaba633be4d350b0c7df26076dbf326c647 Mon Sep 17 00:00:00 2001 From: Jean-Michel Lacroix Date: Mon, 12 Oct 2015 15:49:43 -0400 Subject: [PATCH] Addition of bandwidthd from the oldpackages Signed-off-by: Jean-Michel Lacroix lacroix@lepine-lacroix.info --- utils/bandwidthd/Makefile | 65 +++++++++++++ utils/bandwidthd/files/bandwidthd.config | 11 +++ utils/bandwidthd/files/bandwidthd.init | 88 ++++++++++++++++++ utils/bandwidthd/files/logo.gif | Bin 0 -> 7573 bytes .../patches/010-dont-add-host-paths.patch | 36 +++++++ .../patches/100-fix_config_file_location | 31 ++++++ 6 files changed, 231 insertions(+) create mode 100644 utils/bandwidthd/Makefile create mode 100644 utils/bandwidthd/files/bandwidthd.config create mode 100644 utils/bandwidthd/files/bandwidthd.init create mode 100644 utils/bandwidthd/files/logo.gif create mode 100644 utils/bandwidthd/patches/010-dont-add-host-paths.patch create mode 100644 utils/bandwidthd/patches/100-fix_config_file_location diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile new file mode 100644 index 000000000..6ef14e52b --- /dev/null +++ b/utils/bandwidthd/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bandwidthd +PKG_VERSION:=2.0.1 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/bandwidthd +PKG_MD5SUM:=aa79aad7bd489fd2cae1f7dc086ca8b6 + +PKG_MAINTAINER:=Jean-Michel Lacroix + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:= + +include $(INCLUDE_DIR)/package.mk + +define Package/bandwidthd + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Bandwidthd + URL:=http://bandwidthd.sourceforge.net/ + DEPENDS:=+libgd +libpcap +endef + +define Package/bandwidthd/daemon + This package contains bandwidthd a bandwith tracking utility. +endef + +CONFIGURE_ARGS += \ + ac_cv_file__sw_lib=no \ + ac_cv_file__sw_include=no \ + ac_cv_file__usr_pkg_lib=no \ + ac_cv_file__usr_pkg_include=no \ + ac_cv_file__usr_local_pgsql_lib=no \ + ac_cv_file__usr_local_pgsql_include=no \ + ac_cv_lib_pq_PQconnectdb=no \ + +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +define Package/bandwidthd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/bandwidthd.config $(1)/etc/config/bandwidthd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd + $(INSTALL_DIR) $(1)/www + $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/legend.gif $(1)/www/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/logo.gif $(1)/www/ +endef + +define Package/bandwidthd/conffiles +/etc/config/bandwidthd +endef + +$(eval $(call BuildPackage,bandwidthd)) diff --git a/utils/bandwidthd/files/bandwidthd.config b/utils/bandwidthd/files/bandwidthd.config new file mode 100644 index 000000000..4bb18cf92 --- /dev/null +++ b/utils/bandwidthd/files/bandwidthd.config @@ -0,0 +1,11 @@ +config bandwidthd + option dev br-lan + option subnets "192.168.0.0/16 10.0.0.0/8 172.16.0.0/12" + option skip_intervals 0 + option graph_cutoff 1024 + option promiscuous true + option output_cdf false + option recover_cdf false + option filter ip + option graph true + option meta_refresh 150 diff --git a/utils/bandwidthd/files/bandwidthd.init b/utils/bandwidthd/files/bandwidthd.init new file mode 100644 index 000000000..6483daa2c --- /dev/null +++ b/utils/bandwidthd/files/bandwidthd.init @@ -0,0 +1,88 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008-2011 OpenWrt.org + +START=99 + +config_cb() { + local cfg_type="$1" + local cfg_name="$2" + + case "$cfg_type" in + bandwidthd) + append cfgs "$cfg_name" + ;; + esac +} + +export_bool() { + local option="$1" + local section="$2" + local _loctmp + config_get_bool _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option " + if [ 1 -eq "$_loctmp" ]; then + conffile="${conffile}true" + else + conffile="${conffile}false" + fi + conffile="${conffile}\n" + fi +} + +export_number() { + local option="$1" + local section="$2" + local _loctmp + config_get _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option ${_loctmp}\n" + fi +} + +export_string() { + local option="$1" + local section="$2" + local _loctmp + config_get _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option \"${_loctmp}\"\n" + fi +} + +start() { + local subnet conffile + + [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ + [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs + [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd + rm -f /tmp/bandwidthd.conf + touch /tmp/bandwidthd.conf + [ -e /etc/bandwidthd.conf ] || ln -s /tmp/bandwidthd.conf /etc/bandwidthd.conf + + + config_load bandwidthd + for cfg in $cfgs; do + config_get subnets $cfg subnets + for subnet in $subnets; do + conffile="${conffile}subnet ${subnet}\n" + done + export_string dev $cfg + export_number skip_intervals $cfg + export_number graph_cutoff $cfg + export_bool promiscuous $cfg + export_bool output_cdf $cfg + export_bool recover_cdf $cfg + export_string filter $cfg + export_bool graph $cfg + export_number meta_refresh $cfg + [ -n "$conffile" ] && echo -e "$conffile" >>/tmp/bandwidthd.conf + unset conffile + done + cd / + service_start /usr/sbin/bandwidthd +} + +stop() { + service_stop /usr/sbin/bandwidthd +} diff --git a/utils/bandwidthd/files/logo.gif b/utils/bandwidthd/files/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..7b17cc6cbc70b45aa4b21bcf6bb3f6d6462760e7 GIT binary patch literal 7573 zcmYLq2{@GB7ymm8hS1AcvovGNl6?&^Gj`c!DU`8iDP&*A5<_+(`&hE?TT;qSB1@9B zLe@l5AvAw|fB*mUKhJaSIp;m+^EvOi_qos2($Q3q$J0Wyfdk;5kjVh-H?_1=c6i~d zk^esE1wJ8@$?VN~BO@b%3BI!!Ok82xhYugfzc-Dj@`MrKx}rO7v< zLZr#kuVQk`*p5g`M@B|^HJ1vJh0@EO9ew&l zCSL%_Aen5=L&9Uom@abHf{_uK+;nho5KWFYH#euHrS(g%S4@bhudiPtukF^?V>}D# zW(95%GkOPJXE%=^$OyG+O6z?ik&1EHu8C$du;xeXwn?Q?d+vtI8<&thIQWi=0HXJ=2MP(`MP z{waGW{xN43^_3X_&NRcD^}mDpw_N_i2s{!w^w++A=zn%5WaYCM0FVIHzvNjR;Y=ZC zF2ofHfZtF2OOF@noDOf=06|!d>W1euz&%e z{vYSRn!K|j?K2$hncqNW1kBmC{B6%T{{6>4UTX`r|7!mq59%N2j2{}-3(VD7po|u9=5aW|Lgs)@BbI|Idvf5jIVT_83;MEAu-x#n@=YH>rwE3 zbN9#9fqyaj2>u`N^1t=poxmW-00V+kyMfdlg+K~h4>c6^#)7=MdD@M|{SVosT^EKL zO9qosYVn*pO{K5X1x>50UpGB@lOV35(yIkn7FJ`*lwzsDg!jv#mW%XR~>Ki%qY@w5vtLMb@id8FY zd0HcfrTzoaJ$~Ryutn{y+zT{)bG%F5)AKYJC*DkE~-9G0L zYZ1))j8G6@j6g@9ljRgF2u4s77o!bY4`8fJPKVdAjIKkoln9%RqFAVYcQ*AQwNGJ4 zu^cWw0AyT^}iRq6*3P>+D0I1zzs+=)K36coc4I(idev*PM z?0#N0uWvk}HkLrg&TOWD>;Qe~6Gv;FFOJ##-U2ZgX4LnnSR9RylZ6AV4;55ar9URYM!MMHq%cK1yv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10$*TR58W zXAh{8%Ayh!i1Ac6JHDZq!W6sI;Y@TriKV|uK#7u-&zor7`*XHa*ZXx{bYtqCOB)qC zT%VF>e{MNlOwr*Y0=R|eWK57xT85}mZ}QJ66t78Sz2<%1x-qE}y3(fQY^KaoB;+y! z8_sJdW@^B0)2CfpVm8HIDG&+hn`0ZKZALP3w9XJ=oW@g#s$ExIPc&E$x8|O!%OkO5` z%b2x%rDN3}j~KmSghee}iv(f#iuooLP{IZpM4 zVhyWd?CJpBo1KI}r`}UjMX!EV=NDds7e8fhzI1kY=2m<9(e!H_e~*&2hsD|j-tK3} zD{j^LpK_NQ&6*;qKg_;NwjW~Mee5)1zjLw=g#d)D^j!nNdH2|J@`JbQ#k^hTo$uxO zuNB4?1g<~WQJz>*nqFK{-)~!Z`Zbx{sgZm9_eFnZHfA|axJp9x=fIGBf!MaMyfWGG zEp;dIJ5kt@iy%=PUJ#z5^)h$jomdy}&2)w%2OKUg#h5!SJyn@s_-gjBPE%7_UHJ>X%aSI# z@Qk#~rx~jP7Fjx`a#C5OlP7{vI>Y$ilUdd3PM4CO={d^nr}o$I%XkRsy9&I^u5wtD zZjKvuYxB+`$&|@G-5m9LIhnJ(?R0tUwZ2bVdj2k7xzdV|;r&e0{NH(wl3vf=28JPX zKEYiu6pBWXEK?*Z4Hq19hf$2&RMGhdF6#V>#_{G;#jO1;Y&{{v&Vf3W}n literal 0 HcmV?d00001 diff --git a/utils/bandwidthd/patches/010-dont-add-host-paths.patch b/utils/bandwidthd/patches/010-dont-add-host-paths.patch new file mode 100644 index 000000000..59a57373d --- /dev/null +++ b/utils/bandwidthd/patches/010-dont-add-host-paths.patch @@ -0,0 +1,36 @@ +diff --git a/configure b/configure +index 4c2546e..e516137 100755 +--- a/configure ++++ b/configure +@@ -2439,11 +2439,6 @@ if test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + +-# May be equired for BSD +-LDFLAGS="$LDFLAGS -L/usr/local/lib" +- +-CPPFLAGS="$CPPFLAGS -I/usr/local/include" +- + #Check for Darwin sw directory + echo "$as_me:2448: checking for /sw/lib" >&5 + echo $ECHO_N "checking for /sw/lib... $ECHO_C" >&6 +@@ -2505,9 +2500,6 @@ fi + fi + echo "$as_me:2506: result: $ac_cv_file__usr_pkg_lib" >&5 + echo "${ECHO_T}$ac_cv_file__usr_pkg_lib" >&6 +-if test $ac_cv_file__usr_pkg_lib = yes; then +- LDFLAGS="$LDFLAGS -L/usr/pkg/lib" +-fi + + echo "$as_me:2512: checking for /usr/pkg/include" >&5 + echo $ECHO_N "checking for /usr/pkg/include... $ECHO_C" >&6 +@@ -3092,9 +3084,6 @@ fi + fi + echo "$as_me:3093: result: $ac_cv_file__usr_local_pgsql_lib" >&5 + echo "${ECHO_T}$ac_cv_file__usr_local_pgsql_lib" >&6 +-if test $ac_cv_file__usr_local_pgsql_lib = yes; then +- LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib" +-fi + + echo "$as_me:3099: checking for /usr/local/pgsql/include" >&5 + echo $ECHO_N "checking for /usr/local/pgsql/include... $ECHO_C" >&6 diff --git a/utils/bandwidthd/patches/100-fix_config_file_location b/utils/bandwidthd/patches/100-fix_config_file_location new file mode 100644 index 000000000..ae44cd2e4 --- /dev/null +++ b/utils/bandwidthd/patches/100-fix_config_file_location @@ -0,0 +1,31 @@ +--- bandwidthd-2.0.1/bandwidthd.c.orig 2008-05-09 10:06:37.000000000 -0500 ++++ bandwidthd-2.0.1/bandwidthd.c 2008-05-09 10:32:54.000000000 -0500 +@@ -255,22 +255,22 @@ + + openlog("bandwidthd", LOG_CONS, LOG_DAEMON); + +- if (stat("./etc/bandwidthd.conf", &StatBuf)) ++ if (stat("/etc/bandwidthd.conf", &StatBuf)) + { + chdir(INSTALL_DIR); +- if (stat("./etc/bandwidthd.conf", &StatBuf)) ++ if (stat("/etc/bandwidthd.conf", &StatBuf)) + { +- printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); +- syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); ++ printf("Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); ++ syslog(LOG_ERR, "Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); + exit(1); + } + } + +- bdconfig_in = fopen("./etc/bandwidthd.conf", "rt"); ++ bdconfig_in = fopen("/etc/bandwidthd.conf", "rt"); + if (!bdconfig_in) + { + syslog(LOG_ERR, "Cannot open bandwidthd.conf"); +- printf("Cannot open ./etc/bandwidthd.conf\n"); ++ printf("Cannot open /etc/bandwidthd.conf\n"); + exit(1); + } + bdconfig_parse();