Codebase list bwbar / debian/1.2-5
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. Scott M. Dier authored 22 years ago Tobias Frost committed 6 years ago
16 changed file(s) with 281 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
146146 const struct option longopts[] = {
147147 { "input", 0, 0, 'i' },
148148 { "output", 0, 0, 'o' },
149 { "directory", 1, 0, 'd' },
149150 { "text-file", 1, 0, 'f' },
150151 { "png-file", 1, 0, 'p' },
151152 { "interval", 1, 0, 't' },
168169 "Options: (defaults in parenthesis)\n"
169170 " --input -i Measure input bandwidth\n"
170171 " --output -o Measure output bandwidth (default)\n"
172 " --directory -d Output directory\n"
171173 " --text-file <file> -f The name of the text output file (ubar.txt)\n"
172174 " --png-file <file> -p The name of the graphical bar file (ubar.png)\n"
173175 " --interval <seconds> -t The poll interval in seconds (15)\n"
204206 int measure_input = 0; /* Input instead of output */
205207 char *text_file = "ubar.txt"; /* Text filename */
206208 char *graphics_file = "ubar.png"; /* Graphics filename */
209 char *directory = ""; /* Directory name */
210 char *tmp_char;
207211 char *unit_name = "Mbit/s"; /* Unit name */
208212 double unit = 1.0e+6; /* Unit multiplier */
209213 int interval = 15; /* Interval between measurements (s) */
227231 case 'p':
228232 graphics_file = optarg;
229233 break;
234 case 'd':
235 directory = optarg;
236 break;
230237 case 't':
231238 interval = atoi(optarg);
232239 break;
262269
263270 if ( argc-optind != 2 )
264271 usage(1);
272
273 tmp_char = text_file;
274 text_file = malloc(strlen(text_file) + strlen(directory) + 5);
275 strcpy(text_file, directory);
276 strcat(text_file, "/");
277 strcat(text_file, tmp_char);
278
279 tmp_char = graphics_file;
280 graphics_file = malloc(strlen(graphics_file) + strlen(directory) + 5);
281 strcpy(graphics_file, directory);
282 strcat(graphics_file, "/");
283 strcat(graphics_file, tmp_char);
265284
266285 t_tmp = malloc(strlen(text_file) + 5);
267286 g_tmp = malloc(strlen(graphics_file) + 5);
0 [?25l]2;VIM - /export/scratch/dieman/debian/bwbar-1.2/debian/README]1;README[>c[?1049h[?1h="README" [New File]~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?25l:[?25hq
1 [?25l]2;Terminal]1;Terminal[?1l>[?25h[?1049l
0 Theres an /etc/init.d/bwbar file to configure before this package will
1 work.
2
3 Scott Dier <sdier@debian.org>
0 bwbar (1.2-5) unstable; urgency=low
1
2 * Fixed that I didn't reperm the init.d script, this causes issues
3 because diffs don't keep permissions. Closes: #122310
4
5 -- Scott M. Dier <sdier@debian.org> Tue, 4 Dec 2001 01:08:37 -0600
6
7 bwbar (1.2-4) unstable; urgency=low
8
9 * Didn't copy a line right in the init.d script, fixed. Closes: #119536
10
11 -- Scott M. Dier <sdier@debian.org> Wed, 14 Nov 2001 14:31:34 -0600
12
13 bwbar (1.2-3) unstable; urgency=low
14
15 * Fixed build-deps, added libpng2-dev. closes: #114375
16
17 -- Scott M. Dier <sdier@debian.org> Sat, 6 Oct 2001 20:27:46 -0500
18
19 bwbar (1.2-2) unstable; urgency=low
20
21 * Added --directory function to daemon.
22
23 -- Scott M. Dier <sdier@debian.org> Mon, 1 Oct 2001 02:00:52 -0500
24
25 bwbar (1.2-1) unstable; urgency=low
26
27 * Initial Release.
28
29 -- Scott M. Dier <sdier@debian.org> Sun, 30 Sep 2001 23:35:14 -0500
30
31 Local variables:
32 mode: debian-changelog
33 End:
0 /etc/init.d/bwbar
0 Source: bwbar
1 Section: net
2 Priority: optional
3 Maintainer: Scott M. Dier <sdier@debian.org>
4 Build-Depends: debhelper (>> 3.0.0), libpng2-dev
5 Standards-Version: 3.5.2
6
7 Package: bwbar
8 Architecture: any
9 Depends: ${shlibs:Depends}
10 Description: Generates text and graphical readout of current bandwidth use.
11 This program will output a PNG and a text file that can be used in scripts
12 or be included in web pages to show current bandwidth usage. The amount
13 of total bandwidth can be customized. The PNG output appears as a bar graph
14 showing maximum possible usage with the current inbound or outbound usage
15 shown as a differently colored bar.
16 .
17 An example of this can be seen at http://www.kernel.org/
0 This package was debianized by Scott M. Dier <sdier@debian.org> on
1 Sun, 30 Sep 2001 23:35:14 -0500.
2
3 It was downloaded from http://www.kernel.org/pub/software/web/bwbar/
4
5 Upstream Author(s): Peter Anvin <hpa@zytor.com>
6
7 Copyright:
8
9 Copyright 1999-2001 H. Peter Anvin - All Rights Reserved
10
11 You are free to distribute this software under the terms of
12 the GNU General Public License.
13 On Debian systems, the complete text of the GNU General Public
14 License can be found in /usr/share/common-licenses/GPL file.
0 usr/sbin
1 etc/init.d
0 README
0 #!/bin/sh
1 #
2 # for the bwbar package
3 # Scott Dier <sdier@debian.org>
4
5 # delete/comment the following two lines when configured.
6 echo "/etc/init.d/bwbar isn't configured yet, not starting bwbar."
7 exit 0
8
9 # default settings are suggestions, they may or may not fit your situation
10 RUNME=/usr/sbin/bwbar
11 DIR=/var/www
12 RUNAS=www-data
13 OPTIONS="eth0 1.5"
14
15 [ -x $RUNME ] || exit 0
16
17 case "$1" in
18 start)
19 echo -n "Starting bwbar: "
20 start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
21 echo "done."
22 ;;
23 stop)
24 echo -n "Stopping bwbar: "
25 start-stop-daemon --stop -u $RUNAS --exec $RUNME
26 echo "done."
27 ;;
28 restart|force-reload)
29 echo -n "Restarting bwbar: "
30 start-stop-daemon --stop -u $RUNAS --exec $RUNME
31 sleep 1
32 start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
33 echo "done."
34 ;;
35 *)
36 echo "Usage: /etc/init.d/bwbar {start|stop|restart}"
37 exit 1
38 esac
39
40 exit 0
0 #!/bin/sh
1
2 set -e
3
4 update-rc.d bwbar defaults >/dev/null
5 /etc/init.d/bwbar start
6
7 #DEBHELPER#
8
9 exit 0
0 #!/bin/sh
1
2 set -e
3
4 if [ "$1" = purge ]; then
5 update-rc.d bwbar remove >/dev/null
6 fi
7
8 #DEBHELPER#
9
0 #!/bin/sh
1
2 set -e
3
4 case "$1" in
5 upgrade)
6 /etc/init.d/bwbar stop
7 ;;
8 install)
9 ;;
10 *)
11 echo "preinst called with unknown argument \`$1'" >&2
12 exit 0
13 ;;
14 esac
15
16 #DEBHELPER#
17
18 exit 0
0 #!/bin/sh
1
2 case "$1" in
3 remove|upgrade|deconfigure)
4 /etc/init.d/bwbar stop
5 ;;
6 failed-upgrade)
7 ;;
8 *)
9 echo "prerm called with unknown argument \`$1'" >&2
10 exit 0
11 ;;
12 esac
13
14 #DEBHELPER#
15
16 exit 0
17
0 #!/usr/bin/make -f
1 # Sample debian/rules that uses debhelper.
2 # GNU copyright 1997 to 1999 by Joey Hess.
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # This is the debhelper compatability version to use.
8 export DH_COMPAT=3
9
10 configure: configure-stamp
11 configure-stamp:
12 dh_testdir
13 # Add here commands to configure the package.
14
15
16 touch configure-stamp
17
18 build: configure-stamp build-stamp
19 build-stamp:
20 dh_testdir
21
22 # Add here commands to compile the package.
23 $(MAKE)
24 #/usr/bin/docbook-to-man debian/bwbar.sgml > bwbar.1
25
26 touch build-stamp
27
28 clean:
29 dh_testdir
30 dh_testroot
31 rm -f build-stamp configure-stamp
32
33 # Add here commands to clean up after the build process.
34 -$(MAKE) clean
35
36 dh_clean
37
38 install: build
39 dh_testdir
40 dh_testroot
41 dh_clean -k
42 dh_installdirs
43
44 # Add here commands to install the package into debian/bwbar.
45 #$(MAKE) install DESTDIR=$(CURDIR)/debian/bwbar
46 cp $(CURDIR)/bwbar $(CURDIR)/debian/bwbar/usr/sbin/
47 cp $(CURDIR)/debian/otherfiles/bwbar $(CURDIR)/debian/bwbar/etc/init.d/
48 chmod 755 $(CURDIR)/debian/bwbar/etc/init.d/bwbar
49
50 # Build architecture-independent files here.
51 binary-indep: build install
52 # We have nothing to do by default.
53
54 # Build architecture-dependent files here.
55 binary-arch: build install
56 dh_testdir
57 dh_testroot
58 # dh_installdebconf
59 dh_installdocs
60 dh_installexamples
61 dh_installmenu
62 # dh_installlogrotate
63 # dh_installemacsen
64 # dh_installpam
65 # dh_installmime
66 # dh_installinit
67 dh_installcron
68 dh_installman
69 dh_installinfo
70 dh_undocumented
71 dh_installchangelogs
72 dh_link
73 dh_strip
74 dh_compress
75 dh_fixperms
76 # dh_makeshlibs
77 dh_installdeb
78 # dh_perl
79 dh_shlibdeps
80 dh_gencontrol
81 dh_md5sums
82 dh_builddeb
83
84 binary: binary-indep binary-arch
85 .PHONY: build clean binary-indep binary-arch binary install configure