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

(-)Makefile (-9 / +1 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	upclient
8
PORTNAME=	upclient
9
PORTVERSION=	5.0.b7
9
PORTVERSION=	5.0.b8
10
CATEGORIES=	misc
10
CATEGORIES=	misc
11
MASTER_SITES=	http://uptimes.wonko.com/files/
11
MASTER_SITES=	http://uptimes.wonko.com/files/
12
DISTNAME=	${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
12
DISTNAME=	${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
Lines 36-49 Link Here
36
DOC_FILES+=	HISTORY-BETA
36
DOC_FILES+=	HISTORY-BETA
37
37
38
.include <bsd.port.pre.mk>
38
.include <bsd.port.pre.mk>
39
40
# Post-extract
41
#
42
43
post-extract: rename-doc
44
45
rename-doc:
46
	@${MV} ${WRKSRC}/doc/"Uptimes Protocol 5" ${WRKSRC}/doc/UptimesProtocol5
47
39
48
# Post-patch
40
# Post-patch
49
#
41
#
(-)distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (upclient-5.0b7.tar.gz) = ad56ed3309ce2fadae1f2c0339a4bc80
1
MD5 (upclient-5.0b8.tar.gz) = 5d2ac85193fdb898dd16a694b05ac4d0
(-)files/patch-aa (-9 lines)
Lines 1-14 Link Here
1
--- src/Makefile.orig	Wed Dec 18 01:01:16 2002
1
--- src/Makefile.orig	Wed Dec 18 01:01:16 2002
2
+++ src/Makefile	Mon Feb  3 20:18:03 2003
2
+++ src/Makefile	Mon Feb  3 20:18:03 2003
3
@@ -34,7 +34,7 @@
4
 #
5
   PROGRAMNAME = UpClient
6
 # UPCLIENT_VERSION = "5.0b7"
7
-  UPCLIENT_VERSION = `grep '\#define UPCLIENT_VERSION ' version.h | sed -e 's@\#define UPCLIENT_VERSION @@g' | tr -d '"'`
8
+  UPCLIENT_VERSION =  `sed -n 's/"//g;/\#define UPCLIENT_VERSION /s///p' version.h`
9
 #########################################################################
10
 
11
 
12
@@ -46,7 +46,7 @@
3
@@ -46,7 +46,7 @@
13
 OPTIMIZATION_CFLAGS=-O3
4
 OPTIMIZATION_CFLAGS=-O3
14
 
5
 
(-)files/patch-clientchk (-11 / +2 lines)
Lines 1-5 Link Here
1
--- scripts/clientchk.orig	Thu Oct 24 18:48:35 2002
1
--- scripts/clientchk.orig	Tue May 27 09:03:42 2003
2
+++ scripts/clientchk	Wed Dec 18 02:41:57 2002
2
+++ scripts/clientchk	Wed Jun 11 23:42:17 2003
3
@@ -31,7 +31,7 @@
3
@@ -31,7 +31,7 @@
4
 # variables:
4
 # variables:
5
 
5
 
Lines 9-20 Link Here
9
 
9
 
10
 # clientpid: This is the path to the client PID file.
10
 # clientpid: This is the path to the client PID file.
11
 clientpid="/var/run/upclient.pid"
11
 clientpid="/var/run/upclient.pid"
12
@@ -43,7 +43,7 @@
13
 
14
 # chdirectroy: If we need to change directory before running the client,
15
 #  enter it here.
16
-chdirectory=""
17
+chdirectory="/"
18
 
19
 # You can leave deletefiles or chdirector empty if you don't need them.
20
 # However, you NEED client and clientpid.
(-)files/patch-stats-bsd.c (-30 / +16 lines)
Lines 1-15 Link Here
1
--- src/stats-bsd.c.orig	Wed Dec 18 01:01:17 2002
1
--- src/stats-bsd.c.orig	Tue May 27 09:03:43 2003
2
+++ src/stats-bsd.c	Mon Feb  3 20:20:12 2003
2
+++ src/stats-bsd.c	Wed Jun 11 23:48:40 2003
3
@@ -64,6 +64,8 @@
3
@@ -73,6 +73,8 @@
4
 
4
 
5
 #include "locale.h"     /* gettext */
5
 #include "locale.h"     /* gettext */
6
 
6
 
7
+void logcalc(char *, char *);
7
+void logcalc(char *, char *);
8
+
8
+
9
 /**
9
 /**
10
  * @desc    Verbose level 2 logging of calulations
10
  * @desc    Verbose level 3 logging of calulations
11
  */
11
  */
12
@@ -81,12 +83,13 @@
12
@@ -90,12 +92,13 @@
13
 void
13
 void
14
 initCPU(char *cpu)
14
 initCPU(char *cpu)
15
 {
15
 {
Lines 26-48 Link Here
26
         initialized = 1;
26
         initialized = 1;
27
 
27
 
28
         mib[0] = CTL_HW;
28
         mib[0] = CTL_HW;
29
@@ -98,7 +101,6 @@
29
@@ -180,19 +183,18 @@
30
 
31
         if (sysctl(mib, 2, buf, &size, NULL, 0) == -1) {
32
             uplog(LOG_WARNING, "sysctl: hw.model");
33
-           /* warn("sysctl: hw.model"); */
34
         }
35
         strlcpy(cpu, buf, CPU_SIZE);
36
         logcalc(_("CPU"), cpu);
37
@@ -154,7 +156,6 @@
38
             err(1, "sysctl: kern.boottime");
39
         }
40
         boottimesecs = boottime.tv_sec;
41
-       /* logcalc(_("boot time"), boottimesecs); */
42
 #if defined DEBUG
43
         uplog(LOG_DEBUG, "initBoottime() initialized %d", boottimesecs);
44
 #endif /* DEBUG */
45
@@ -173,19 +174,18 @@
46
               _("%s %s not implemented for this operating system %s"),
30
               _("%s %s not implemented for this operating system %s"),
47
               _("WARNING:"), _("Load-average"), strerror(errno));
31
               _("WARNING:"), _("Load-average"), strerror(errno));
48
         cfg_SendUsage = 0;
32
         cfg_SendUsage = 0;
Lines 67-73 Link Here
67
 }
51
 }
68
 
52
 
69
 #if !defined __MACH__   /* Mach kernel stuff is in stats-mach.c */
53
 #if !defined __MACH__   /* Mach kernel stuff is in stats-mach.c */
70
@@ -259,6 +259,10 @@
54
@@ -266,6 +268,10 @@
71
            /* store values for next calculation interval */
55
            /* store values for next calculation interval */
72
             for (state = 0; state < CPUSTATES; state++)
56
             for (state = 0; state < CPUSTATES; state++)
73
                 stime[state] = ctime[state];
57
                 stime[state] = ctime[state];
Lines 78-84 Link Here
78
         }
62
         }
79
     }
63
     }
80
     else {
64
     else {
81
@@ -269,17 +273,13 @@
65
@@ -276,17 +282,13 @@
82
         cfg_SendUsage = 0;
66
         cfg_SendUsage = 0;
83
         cfg_SendIdle = 0;
67
         cfg_SendIdle = 0;
84
     }
68
     }
Lines 97-103 Link Here
97
 
81
 
98
     boottimesecs = initBoottime();
82
     boottimesecs = initBoottime();
99
 
83
 
100
@@ -294,7 +294,7 @@
84
@@ -301,7 +303,7 @@
101
 #endif /* DEBUG */
85
 #endif /* DEBUG */
102
     }
86
     }
103
     else {
87
     else {
Lines 106-112 Link Here
106
               "getUptime() boottime.tv_sec");
90
               "getUptime() boottime.tv_sec");
107
     }
91
     }
108
 }
92
 }
109
@@ -307,19 +307,18 @@
93
@@ -314,21 +316,20 @@
110
          double *IdlePercent, char *osname, char *osversion, char *cpu,
94
          double *IdlePercent, char *osname, char *osversion, char *cpu,
111
          double *loadavg)
95
          double *loadavg)
112
 {
96
 {
Lines 123-134 Link Here
123
 
107
 
124
     if (cfg_sendcpu)
108
     if (cfg_sendcpu)
125
-        initCPU(&*cpu);
109
-        initCPU(&*cpu);
126
-
127
-   /* if (cfg_sendloadavg) */
128
-    getLoadavg(&*loadavg);
129
+        initCPU(cpu);
110
+        initCPU(cpu);
130
 
111
 
131
+    if (cfg_sendloadavg)
112
    /* WARNING: loadavg is not implemented on Wonko server! */
113
    /* cfg_SendUsage is implemented instead. (i.e. only CPU usage % a la `top`) */
114
-   /* if (cfg_sendloadavg) */
115
-    getLoadavg(&*loadavg);
116
-
117
+   if (cfg_sendloadavg)
132
+	getLoadavg(loadavg);
118
+	getLoadavg(loadavg);
133
 }
119
 }
134
 #endif /* PLATFORM_BSD */
120
 #endif /* PLATFORM_BSD */

Return to bug 53230