View | Details | Raw Unified | Return to bug 137179
Collapse All | Expand All

(-)bin/Makefile (-2 / +1 lines)
Lines 5-13 Link Here
5
SRCS= db.c db.h file_sky.c file_sky.h parse_http.c parse_http.h skyfish.h skyfish.c my_types.h \
5
SRCS= db.c db.h file_sky.c file_sky.h parse_http.c parse_http.h skyfish.h skyfish.c my_types.h \
6
	interface.h interface.c sky_node.c sky_node.h sky_conf.c sky_conf.h sky_shm.c sky_shm.h convert.h convert.c
6
	interface.h interface.c sky_node.c sky_node.h sky_conf.c sky_conf.h sky_shm.c sky_shm.h convert.h convert.c
7
PROG= skyfish
7
PROG= skyfish
8
PREFIX=/usr/local
9
NO_MAN=
8
NO_MAN=
10
BINDIR= /usr/local/bin
9
BINDIR= ${PREFIX}/bin
11
BINOWN= root
10
BINOWN= root
12
BINGRP= wheel
11
BINGRP= wheel
13
BINMODE= 4550
12
BINMODE= 4550
(-)doc/Makefile (-8 / +6 lines)
Lines 1-14 Link Here
1
1
2
NO_MAN=
2
NO_MAN=
3
3
4
PREFIX=/usr/local/share/doc/skyfish
5
6
install:
4
install:
7
	mkdir -p ${PREFIX}
5
	mkdir -p ${PREFIX}/share/doc/skyfish
8
	cp -f README ${PREFIX}
6
	cp -f README ${PREFIX}/share/doc/skyfish
9
	cp -f README.rus ${PREFIX}
7
	cp -f README.rus ${PREFIX}/share/doc/skyfish
10
	cp -f COPYRIGHT ${PREFIX}	
8
	cp -f COPYRIGHT ${PREFIX}/share/doc/skyfish	
11
	cp -f CREDITS ${PREFIX}	
9
	cp -f CREDITS ${PREFIX}/share/doc/skyfish
12
	cp -f CHANGES ${PREFIX}
10
	cp -f CHANGES ${PREFIX}/share/doc/skyfish
13
11
14
.include<bsd.prog.mk>
12
.include<bsd.prog.mk>
(-)etc/Makefile (-4 / +2 lines)
Lines 1-9 Link Here
1
1
2
PREFIX=/usr/local/etc
3
4
NO_MAN=
2
NO_MAN=
5
3
6
install:
4
install:
7
	cp -f skyfish.conf.dist ${PREFIX}
5
	cp -f skyfish.conf.dist ${PREFIX}/etc
8
6
9
.include<bsd.prog.mk>
7
.include<bsd.prog.mk>
(-)bin/interface.c (-1 / +8 lines)
Lines 862-868 Link Here
862
		
862
		
863
		bzero(&tmp2[0],320);
863
		bzero(&tmp2[0],320);
864
	    traf=db[i].rspeed;
864
	    traf=db[i].rspeed;
865
		if (traf == 0 && db[i].deltatime > 10) sprintf(tmp2,"|-[%4lu]s",db[i].deltatime);
865
		if (traf == 0 && db[i].deltatime > 10) {
866
			if (db[i].deltatime >= 3600)  
867
				sprintf(tmp2,"|-[%4lu]h",db[i].deltatime/3600);
868
			if (db[i].deltatime >= 60 && db[i].deltatime < 3600)
869
				sprintf(tmp2,"|-[%4lu]m",db[i].deltatime/60);
870
			else
871
				sprintf(tmp2,"|-[%4lu]s",db[i].deltatime);
872
			}
866
		else if (traf > GB) 		sprintf(tmp2,"|%4.0f G/s",traf/GBYTE);	
873
		else if (traf > GB) 		sprintf(tmp2,"|%4.0f G/s",traf/GBYTE);	
867
	    else if (traf > MB) 	sprintf(tmp2,"|%4.0f M/s",traf/MBYTE);
874
	    else if (traf > MB) 	sprintf(tmp2,"|%4.0f M/s",traf/MBYTE);
868
	    else if (traf > KB) 	sprintf(tmp2,"|%4.0f K/s",traf/KBYTE);
875
	    else if (traf > KB) 	sprintf(tmp2,"|%4.0f K/s",traf/KBYTE);
(-)man/Makefile (-2 / +2 lines)
Lines 1-6 Link Here
1
#
1
#
2
2
3
MAN1= skyfish.1
3
MAN1= skyfish.1
4
MANDIR = /usr/local/man/man
4
MANDIR = ${PREFIX}/man/man
5
5
6
.include<bsd.prog.mk>
6
.include<bsd.prog.mk>
(-)bin/my_types.h (-1 / +1 lines)
Lines 46-52 Link Here
46
#define CP1251	2
46
#define CP1251	2
47
47
48
48
49
static char VERSION[] = "0.90";
49
static char VERSION[] = "0.91";
50
50
51
#define	LENTMP 320
51
#define	LENTMP 320
52
#define	LENPATH 300
52
#define	LENPATH 300
(-)bin/skyfish.c (-1 / +6 lines)
Lines 92-98 Link Here
92
		fclose(fd);
92
		fclose(fd);
93
		}
93
		}
94
94
95
	while ((ch = getopt(argc, argv, "rdsi")) != -1)
95
	while ((ch = getopt(argc, argv, "rdsiv")) != -1)
96
		switch (ch) {
96
		switch (ch) {
97
		case 'd': /* daemon mode */
97
		case 'd': /* daemon mode */
98
			if (rpid > 0) {printf("Daemon already running\n");return 1;}
98
			if (rpid > 0) {printf("Daemon already running\n");return 1;}
Lines 119-126 Link Here
119
			runmode=CLIENT;
119
			runmode=CLIENT;
120
			if (rpid == 0) {printf("No running daemon\n");return 1;}
120
			if (rpid == 0) {printf("No running daemon\n");return 1;}
121
			break;
121
			break;
122
		case 'v':
123
			printf("Skyfish version %s\n",VERSION);
124
			return 1;
125
			break;
122
		default:
126
		default:
123
			printf("read man skyfish\n");
127
			printf("read man skyfish\n");
128
			return 1;
124
			break;
129
			break;
125
		}
130
		}
126
	if (argc < 2 && rpid > 0) {printf("Daemon already running\n");return 1;}
131
	if (argc < 2 && rpid > 0) {printf("Daemon already running\n");return 1;}

Return to bug 137179