Commit 1cc34fea authored by Scott Dier's avatar Scott Dier Committed by Tobias Frost

Import Debian changes 1.2-5

bwbar (1.2-5) unstable; urgency=low

  * Fixed that I didn't reperm the init.d script, this causes issues
  because diffs don't keep permissions.  Closes: #122310

bwbar (1.2-4) unstable; urgency=low

  * Didn't copy a line right in the init.d script, fixed. Closes: #119536

bwbar (1.2-3) unstable; urgency=low

  * Fixed build-deps, added libpng2-dev.  closes: #114375

bwbar (1.2-2) unstable; urgency=low

  * Added --directory function to daemon.

bwbar (1.2-1) unstable; urgency=low

  * Initial Release.
parent 777b72bc
......@@ -147,6 +147,7 @@ int write_bar_graph(FILE *f, double perc, int width, int height, int border, int
const struct option longopts[] = {
{ "input", 0, 0, 'i' },
{ "output", 0, 0, 'o' },
{ "directory", 1, 0, 'd' },
{ "text-file", 1, 0, 'f' },
{ "png-file", 1, 0, 'p' },
{ "interval", 1, 0, 't' },
......@@ -169,6 +170,7 @@ void usage(int err)
"Options: (defaults in parenthesis)\n"
" --input -i Measure input bandwidth\n"
" --output -o Measure output bandwidth (default)\n"
" --directory -d Output directory\n"
" --text-file <file> -f The name of the text output file (ubar.txt)\n"
" --png-file <file> -p The name of the graphical bar file (ubar.png)\n"
" --interval <seconds> -t The poll interval in seconds (15)\n"
......@@ -205,6 +207,8 @@ int main(int argc, char *argv[])
int measure_input = 0; /* Input instead of output */
char *text_file = "ubar.txt"; /* Text filename */
char *graphics_file = "ubar.png"; /* Graphics filename */
char *directory = ""; /* Directory name */
char *tmp_char;
char *unit_name = "Mbit/s"; /* Unit name */
double unit = 1.0e+6; /* Unit multiplier */
int interval = 15; /* Interval between measurements (s) */
......@@ -228,6 +232,9 @@ int main(int argc, char *argv[])
case 'p':
graphics_file = optarg;
break;
case 'd':
directory = optarg;
break;
case 't':
interval = atoi(optarg);
break;
......@@ -264,6 +271,18 @@ int main(int argc, char *argv[])
if ( argc-optind != 2 )
usage(1);
tmp_char = text_file;
text_file = malloc(strlen(text_file) + strlen(directory) + 5);
strcpy(text_file, directory);
strcat(text_file, "/");
strcat(text_file, tmp_char);
tmp_char = graphics_file;
graphics_file = malloc(strlen(graphics_file) + strlen(directory) + 5);
strcpy(graphics_file, directory);
strcat(graphics_file, "/");
strcat(graphics_file, tmp_char);
t_tmp = malloc(strlen(text_file) + 5);
g_tmp = malloc(strlen(graphics_file) + 5);
if ( !t_tmp || !g_tmp ) {
......
[?25l]2;VIM - /export/scratch/dieman/debian/bwbar-1.2/debian/README]1;README[>c[?1049h[?1h="README" [New File]~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?25l:[?25hq [?25l]2;Terminal]1;Terminal[?1l>[?25h[?1049l
\ No newline at end of file
Theres an /etc/init.d/bwbar file to configure before this package will
work.
Scott Dier <sdier@debian.org>
bwbar (1.2-5) unstable; urgency=low
* Fixed that I didn't reperm the init.d script, this causes issues
because diffs don't keep permissions. Closes: #122310
-- Scott M. Dier <sdier@debian.org> Tue, 4 Dec 2001 01:08:37 -0600
bwbar (1.2-4) unstable; urgency=low
* Didn't copy a line right in the init.d script, fixed. Closes: #119536
-- Scott M. Dier <sdier@debian.org> Wed, 14 Nov 2001 14:31:34 -0600
bwbar (1.2-3) unstable; urgency=low
* Fixed build-deps, added libpng2-dev. closes: #114375
-- Scott M. Dier <sdier@debian.org> Sat, 6 Oct 2001 20:27:46 -0500
bwbar (1.2-2) unstable; urgency=low
* Added --directory function to daemon.
-- Scott M. Dier <sdier@debian.org> Mon, 1 Oct 2001 02:00:52 -0500
bwbar (1.2-1) unstable; urgency=low
* Initial Release.
-- Scott M. Dier <sdier@debian.org> Sun, 30 Sep 2001 23:35:14 -0500
Local variables:
mode: debian-changelog
End:
/etc/init.d/bwbar
Source: bwbar
Section: net
Priority: optional
Maintainer: Scott M. Dier <sdier@debian.org>
Build-Depends: debhelper (>> 3.0.0), libpng2-dev
Standards-Version: 3.5.2
Package: bwbar
Architecture: any
Depends: ${shlibs:Depends}
Description: Generates text and graphical readout of current bandwidth use.
This program will output a PNG and a text file that can be used in scripts
or be included in web pages to show current bandwidth usage. The amount
of total bandwidth can be customized. The PNG output appears as a bar graph
showing maximum possible usage with the current inbound or outbound usage
shown as a differently colored bar.
.
An example of this can be seen at http://www.kernel.org/
This package was debianized by Scott M. Dier <sdier@debian.org> on
Sun, 30 Sep 2001 23:35:14 -0500.
It was downloaded from http://www.kernel.org/pub/software/web/bwbar/
Upstream Author(s): Peter Anvin <hpa@zytor.com>
Copyright:
Copyright 1999-2001 H. Peter Anvin - All Rights Reserved
You are free to distribute this software under the terms of
the GNU General Public License.
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.
usr/sbin
etc/init.d
#!/bin/sh
#
# for the bwbar package
# Scott Dier <sdier@debian.org>
# delete/comment the following two lines when configured.
echo "/etc/init.d/bwbar isn't configured yet, not starting bwbar."
exit 0
# default settings are suggestions, they may or may not fit your situation
RUNME=/usr/sbin/bwbar
DIR=/var/www
RUNAS=www-data
OPTIONS="eth0 1.5"
[ -x $RUNME ] || exit 0
case "$1" in
start)
echo -n "Starting bwbar: "
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
echo "done."
;;
stop)
echo -n "Stopping bwbar: "
start-stop-daemon --stop -u $RUNAS --exec $RUNME
echo "done."
;;
restart|force-reload)
echo -n "Restarting bwbar: "
start-stop-daemon --stop -u $RUNAS --exec $RUNME
sleep 1
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
echo "done."
;;
*)
echo "Usage: /etc/init.d/bwbar {start|stop|restart}"
exit 1
esac
exit 0
#!/bin/sh
set -e
update-rc.d bwbar defaults >/dev/null
/etc/init.d/bwbar start
#DEBHELPER#
exit 0
#!/bin/sh
set -e
if [ "$1" = purge ]; then
update-rc.d bwbar remove >/dev/null
fi
#DEBHELPER#
#!/bin/sh
set -e
case "$1" in
upgrade)
/etc/init.d/bwbar stop
;;
install)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
case "$1" in
remove|upgrade|deconfigure)
/etc/init.d/bwbar stop
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE)
#/usr/bin/docbook-to-man debian/bwbar.sgml > bwbar.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/bwbar.
#$(MAKE) install DESTDIR=$(CURDIR)/debian/bwbar
cp $(CURDIR)/bwbar $(CURDIR)/debian/bwbar/usr/sbin/
cp $(CURDIR)/debian/otherfiles/bwbar $(CURDIR)/debian/bwbar/etc/init.d/
chmod 755 $(CURDIR)/debian/bwbar/etc/init.d/bwbar
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installcron
dh_installman
dh_installinfo
dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment