aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorpetef <petef@FreeBSD.org>2003-01-03 14:35:32 +0800
committerpetef <petef@FreeBSD.org>2003-01-03 14:35:32 +0800
commit453db036e363e1679a5c679d949a188d051ce008 (patch)
tree6aca5b30be1cd0c6fc7f37deaf60d30a99c947f2 /misc
parentb82acbaacba24a7d01372857f3ebfdcffea17da9 (diff)
downloadfreebsd-ports-gnome-453db036e363e1679a5c679d949a188d051ce008.tar.gz
freebsd-ports-gnome-453db036e363e1679a5c679d949a188d051ce008.tar.zst
freebsd-ports-gnome-453db036e363e1679a5c679d949a188d051ce008.zip
Update to 5.0.b6.
PR: 46339 Submitted by: maintainer
Diffstat (limited to 'misc')
-rw-r--r--misc/upclient/Makefile29
-rw-r--r--misc/upclient/distinfo2
-rw-r--r--misc/upclient/files/patch-aa26
-rw-r--r--misc/upclient/files/patch-ab15
-rw-r--r--misc/upclient/files/patch-clientchk20
-rw-r--r--misc/upclient/files/patch-options.c20
-rw-r--r--misc/upclient/files/patch-options.h14
-rw-r--r--misc/upclient/files/patch-stats-bsd.c417
-rw-r--r--misc/upclient/files/patch-transmit.c12
-rw-r--r--misc/upclient/files/patch-upchk2
-rw-r--r--misc/upclient/files/upclient.sh12
-rw-r--r--misc/upclient/pkg-plist4
12 files changed, 252 insertions, 321 deletions
diff --git a/misc/upclient/Makefile b/misc/upclient/Makefile
index aaf27b8dad07..f2d706c019ec 100644
--- a/misc/upclient/Makefile
+++ b/misc/upclient/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= upclient
-PORTVERSION= 5.0.b5
+PORTVERSION= 5.0.b6
CATEGORIES= misc
MASTER_SITES= http://uptimes.wonko.com/files/
DISTNAME= ${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
@@ -16,7 +16,10 @@ MAINTAINER= cyrille.lefevre@laposte.net
# Global variables
#
+LIB_DEPENDS= intl.4:${PORTSDIR}/devel/gettext
+
USE_REINPLACE= yes
+USE_GMAKE= yes
ALL_TARGET= bsd
BUILD_WRKSRC= ${WRKSRC}/src
@@ -29,10 +32,19 @@ MAN8= upclient.8
#
DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO
+DOC_FILES+= doc/UptimesProtocol5
DOC_FILES+= HISTORY-BETA
.include <bsd.port.pre.mk>
+# Post-extract
+#
+
+post-extract: rename-doc
+
+rename-doc:
+ @${MV} ${WRKSRC}/doc/"Uptimes Protocol 5" ${WRKSRC}/doc/UptimesProtocol5
+
# Post-patch
#
@@ -40,7 +52,9 @@ post-patch: patch-prefix patch-pkgmessage
patch-prefix:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
- ${WRKSRC}/scripts/upchk ${WRKSRC}/src/Makefile
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \
+ ${WRKSRC}/src/Makefile
patch-pkgmessage:
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
@@ -48,11 +62,12 @@ patch-pkgmessage:
# Install
#
-do-install: install-program install-man install-sample install-script
+do-install: install-program install-man install-sample install-script \
+ install-locale
install-program:
@${INSTALL_PROGRAM} -g kmem -m 2555 ${WRKSRC}/src/products/upclient \
- ${PREFIX}/sbin/upclient
+ ${PREFIX}/sbin
install-man:
@${INSTALL_MAN} ${WRKSRC}/src/products/upclient.8 \
@@ -63,7 +78,11 @@ install-sample:
${PREFIX}/etc/upclient.conf.sample
install-script:
- @${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${PREFIX}/sbin/upchk
+ @${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \
+ ${PREFIX}/sbin
+
+install-locale:
+ @cd ${WRKSRC}/src; ${GMAKE} install-locales
# Post-install
#
diff --git a/misc/upclient/distinfo b/misc/upclient/distinfo
index e5858776df6a..9033ce83bb32 100644
--- a/misc/upclient/distinfo
+++ b/misc/upclient/distinfo
@@ -1 +1 @@
-MD5 (upclient-5.0b5.tar.gz) = fa6a74f146eacf47f4b0773a835a570e
+MD5 (upclient-5.0b6.tar.gz) = 3d4c45addb947a51deabf2205188b82e
diff --git a/misc/upclient/files/patch-aa b/misc/upclient/files/patch-aa
index 3c2cd77fce77..b0deb2cc3186 100644
--- a/misc/upclient/files/patch-aa
+++ b/misc/upclient/files/patch-aa
@@ -1,5 +1,14 @@
---- src/Makefile.orig Thu Oct 10 04:36:35 2002
-+++ src/Makefile Sat Oct 19 23:21:49 2002
+--- src/Makefile.orig Sat Nov 30 03:29:55 2002
++++ src/Makefile Wed Dec 18 01:29:34 2002
+@@ -34,7 +34,7 @@
+ #
+ PROGRAMNAME = upclient
+ # UPCLIENT_VERSION = "5.0b6"
+- UPCLIENT_VERSION = `grep '\#define UPCLIENT_VERSION ' version.h | sed -e 's@\#define UPCLIENT_VERSION @@g' | tr -d '"'`
++ UPCLIENT_VERSION = `sed -n 's/"//g;/\#define UPCLIENT_VERSION /s///p' version.h`
+ ################################################################################
+
+ binname = upclient
@@ -44,7 +44,7 @@
@@ -18,3 +27,16 @@
# Further Reading
# Filesystem Hierarchy Standard 2.2 May 24, 2001
+@@ -82,9 +82,9 @@
+
+ ## [x86] FreeBSD (4.7-RC)
+ ## assumes gettext installed in /usr/local
+-#localedir = ${datadir}/locale
+-#LOCALEFLAGS = -DLOCALEPATH=\"$(localedir)\" -I/usr/local/include
+-#LOCALELIBS = -L/usr/local/lib -lintl
++localedir = ${datadir}/locale
++LOCALEFLAGS = -DLOCALEPATH=\"$(localedir)\" -I%%LOCALBASE%%/include
++LOCALELIBS = -L%%LOCALBASE%%/lib -lintl
+
+ ## [Sparc - R220] Sun Solaris (5.8)
+ ## not sure whether this locale dir is correct
diff --git a/misc/upclient/files/patch-ab b/misc/upclient/files/patch-ab
index ab837aa78c5d..e65685849647 100644
--- a/misc/upclient/files/patch-ab
+++ b/misc/upclient/files/patch-ab
@@ -1,5 +1,5 @@
---- src/conf/upclient.conf.orig Thu Oct 10 04:36:24 2002
-+++ src/conf/upclient.conf Sat Oct 19 19:41:36 2002
+--- src/conf/upclient.conf.orig Sat Nov 30 03:27:16 2002
++++ src/conf/upclient.conf Wed Dec 18 02:31:09 2002
@@ -9,7 +9,7 @@
AuthKey = <your_authkey> # Your Authorization key
@@ -8,4 +8,13 @@
+Interval = 550 # Transmit interval
UptimeServer = @UPTIMES_SERVER@ # Uptimes Project's data server
- SendIdleTime = 1 # Send your idle time
+ SendIdle = 1 # Send CPU idle percent
+@@ -20,7 +20,7 @@
+ SendCPUDetail = 1 # (BSD, Linux, Solaris & Irix only)
+ # 0 = send generic CPU architecture
+ # 1 = send specific CPU model
+-SendLoadAvg = 0 # Send 15-minute Load-average (unix only) (not implemented)
++SendLoadAvg = 1 # Send 15-minute Load-average (unix only)
+
+ # Fill in if you're behind a proxy server.
+ #ProxyServer = <your.proxy.server.com>
diff --git a/misc/upclient/files/patch-clientchk b/misc/upclient/files/patch-clientchk
new file mode 100644
index 000000000000..b645c63e820f
--- /dev/null
+++ b/misc/upclient/files/patch-clientchk
@@ -0,0 +1,20 @@
+--- scripts/clientchk.orig Thu Oct 24 18:48:35 2002
++++ scripts/clientchk Wed Dec 18 02:41:57 2002
+@@ -31,7 +31,7 @@
+ # variables:
+
+ # client: This is the path to the client program.
+-client="/usr/sbin/upclient"
++client="%%PREFIX%%/sbin/upclient"
+
+ # clientpid: This is the path to the client PID file.
+ clientpid="/var/run/upclient.pid"
+@@ -43,7 +43,7 @@
+
+ # chdirectroy: If we need to change directory before running the client,
+ # enter it here.
+-chdirectory=""
++chdirectory="/"
+
+ # You can leave deletefiles or chdirector empty if you don't need them.
+ # However, you NEED client and clientpid.
diff --git a/misc/upclient/files/patch-options.c b/misc/upclient/files/patch-options.c
index 11fac1651d90..89b01d7ce622 100644
--- a/misc/upclient/files/patch-options.c
+++ b/misc/upclient/files/patch-options.c
@@ -1,11 +1,11 @@
---- src/options.c.orig Wed Oct 2 06:50:49 2002
-+++ src/options.c Sat Oct 19 22:54:06 2002
-@@ -55,7 +55,7 @@
+--- src/options.c.orig Sat Nov 30 03:27:15 2002
++++ src/options.c Wed Dec 18 01:43:00 2002
+@@ -60,7 +60,7 @@
+ * Minimum value is enforced. A warning is logged if greater than upper limit.
*/
- char cfg_authkey[AUTHKEY_REQUIRED_LEN+1] = "";
- char cfg_upserver[UPSERVER_MAXLEN+1] = "uptimes.wonko.com";
--int cfg_interval = 300;
-+int cfg_interval = 550;
- char cfg_pidfile[PIDFILE_MAXLEN+1] = PIDFILE;
- char cfg_proxyserver[PROXYSERVER_MAXLEN+1] = "";
- int cfg_udpport = 49153;
+ #define MINIMUM_INTERVAL 30 /* enforced */
+-#define DEFAULT_INTERVAL 300
++#define DEFAULT_INTERVAL 550
+ #define UPPER_INTERVAL 600 /* warning if exceeded */
+
+ /* Macros */
diff --git a/misc/upclient/files/patch-options.h b/misc/upclient/files/patch-options.h
deleted file mode 100644
index 36fbd81e0ec2..000000000000
--- a/misc/upclient/files/patch-options.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/options.h.orig Mon Sep 30 02:58:36 2002
-+++ src/options.h Sat Oct 19 22:55:19 2002
-@@ -60,11 +60,7 @@
- extern char cfg_proxyuser[PROXYUSER_MAXLEN+1];
- extern char cfg_proxypass[PROXYPASS_MAXLEN+1];
- extern int cfg_sendidle;
--#if defined(PLATFORM_UNIXWARE)
- extern int cfg_sendload;
--#else
--extern int cfg_sendload;
--#endif
- extern int cfg_sendos;
- extern int cfg_sendoslevel;
- extern int cfg_sendcpu;
diff --git a/misc/upclient/files/patch-stats-bsd.c b/misc/upclient/files/patch-stats-bsd.c
index 9e3eb46809dc..2c5f1380a3b5 100644
--- a/misc/upclient/files/patch-stats-bsd.c
+++ b/misc/upclient/files/patch-stats-bsd.c
@@ -1,294 +1,143 @@
---- src/stats-bsd.c.orig Mon Sep 30 02:58:36 2002
-+++ src/stats-bsd.c Sat Oct 19 22:50:30 2002
-@@ -41,139 +41,171 @@
- #include "upclient.h"
- #include "options.h"
- #include "stats.h"
--#include "uplog.h" /* wrapper for <syslog.h> */
+--- src/stats-bsd.c.orig Sat Nov 30 03:27:16 2002
++++ src/stats-bsd.c Wed Dec 18 03:28:16 2002
+@@ -64,6 +64,8 @@
- /* System includes */
--#include <kvm.h>
--#include <stdio.h>
-+#include <err.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <kvm.h>
- #include <limits.h>
--#include <sys/time.h>
--#include <sys/param.h>
-+#include <stdio.h>
-+#include <syslog.h>
- #include <sys/dkstat.h>
-+#include <sys/param.h>
- #include <sys/sysctl.h>
-+#include <sys/time.h>
- #include <sys/utsname.h>
+ #include "locale.h" /* gettext */
++void logcalc(char *, char *);
++
/**
- * @desc Get statistics
+ * @desc Verbose level 2 logging of calulations
*/
--void getstats(unsigned long *puptime, double *pload, int *pidle, char *os, char *oslevel, char *cpu) {
-- struct utsname uts;
-- struct timeval boottime;
-+void
-+getstats(unsigned long *puptime, double *pload, int *pidle,
-+ char *os, char *oslevel, char *cpu)
-+{
-+ size_t size;
-+ int mib[2];
-+
-+ { /* ========== uptime ========== */
-+ static struct timeval boottime;
-+ static int initialized = 0;
- time_t now;
+@@ -81,12 +83,13 @@
+ void
+ initCPU(char *cpu)
+ {
+- char buf[CPU_SIZE] = "";
+ static int initialized = 0;
- size_t size;
-- double loadavgs[2];
-- int mib[2];
--
-- /* Get uptime */
-- time(&now);
-- mib[0] = CTL_KERN;
-- mib[1] = KERN_BOOTTIME;
-- size = sizeof(boottime);
-- if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && (boottime.tv_sec != 0)) {
-- *puptime = now - boottime.tv_sec;
-- *puptime /= 60;
-- }
--
-- if (cfg_sendload) {
-- /* Get load average */
-- getloadavg(loadavgs, 3);
-- /* Use the 3rd element (15 minute load average) */
-- *pload = loadavgs[2];
-- }
--
-- if (cfg_sendos) {
-- /* Get os info */
-- uname(&uts);
-- }
--
-- if (cfg_sendcpu) {
-- /* Get CPU info */
-- mib[0] = CTL_HW;
-- if (cfg_sendcpulevel == 1) {
-- mib[1] = HW_MACHINE; /* Send architecture */
-- }
-- else {
-- mib[1] = HW_MODEL; /* Send architecture's specific model */
-- }
-- size = CPU_SIZE;
-- sysctl(mib, 2, cpu, &size, NULL, 0);
-- }
--
-- if (cfg_sendos) {
-- strncpy(os, uts.sysname, OS_SIZE - 1);
-- if (cfg_sendoslevel) {
-- strncpy(oslevel, uts.release, OSLEVEL_SIZE - 1);
-- }
-- }
--
-- if (cfg_sendidle) {
-- static kvm_t *kp;
-- static int initialized = 0;
-- static struct nlist namelist [] = {
-+
-+ if (!initialized) {
-+ initialized = 1;
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_BOOTTIME;
-+ size = sizeof(boottime);
-+
-+ if (sysctl(mib, 2, &boottime, &size, NULL, 0) == -1) {
-+ uplog(LOG_ERR, "sysctl: kern.boottime");
-+ err(1, "sysctl: kern.boottime");
-+ }
-+ }
-+
-+ if (boottime.tv_sec) {
-+ time_t now;
-+
-+ time (&now);
-+
-+ *puptime = now - boottime.tv_sec;
-+ *puptime /= 60;
-+ }
-+ }
-+
-+ if (cfg_sendload) { /* ========== loadavg ========== */
-+ double loadavgs[3] = { 0. };
-+
-+ getloadavg(loadavgs, 3);
-+ /* Use the 3rd element (15 minute load average) */
-+ *pload = loadavgs[2];
-+ }
-+
-+ if (cfg_sendcpu) { /* ========== cpu ========== */
-+ static char buf[CPU_SIZE] = "";
-+ static int initialized = 0;
-+
-+ if (!initialized) {
-+ initialized = 1;
-+
-+ mib[0] = CTL_HW;
-+ if (cfg_sendcpulevel == 1)
-+ mib[1] = HW_MACHINE; /* Send architecture */
-+ else
-+ mib[1] = HW_MODEL; /* Send architecture's specific model */
-+ size = CPU_SIZE;
-+
-+ if (sysctl(mib, 2, buf, &size, NULL, 0) == -1) {
-+ uplog(LOG_WARNING, "sysctl: hw.model");
-+ /* warn("sysctl: hw.model"); */
-+ }
-+ }
-+
-+ strlcpy(cpu, buf, CPU_SIZE);
-+ }
-+
-+ if (cfg_sendos) {
-+ static struct utsname uts;
-+ static int initialized = 0;
-+
-+ if (!initialized) {
-+ initialized = 1;
-+
-+ uname(&uts);
-+ }
-+
-+ strlcpy(os, uts.sysname, OS_SIZE);
-+
-+ if (cfg_sendoslevel)
-+ strlcpy(oslevel, uts.release, OSLEVEL_SIZE);
-+ }
+- int mib[2];
+
+ if (!initialized) {
++ char buf[CPU_SIZE] = "";
++ size_t size;
++ int mib[2];
+
-+ if (cfg_sendidle) { /* ========== idle_time ========== */
-+ static kvm_t *kp;
-+ static int initialized = 0;
-+ static struct nlist namelist[] = {
- #define X_CP_TIME 0
-- { "_cp_time" },
-- { NULL },
-- };
--
-- if (!initialized) {
-- char errbuf[_POSIX2_LINE_MAX];
-- initialized = 1;
--
-- setgid(getgid());
--
-- kp = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
--
-- if (!kp) {
-- uplog(LOG_WARNING, "kvm_openfiles: %s. (Did you forget to start upclient as root?)", errbuf);
--// warn("kvm_openfiles: %s", errbuf);
-- }
-- else if (kvm_nlist(kp,namelist) == -1) {
-- uplog(LOG_WARNING, "kvm_nlist: %s", kvm_geterr(kp));
--// warn("kvm_nlist: %s", kvm_geterr(kp));
-- }
-- }
--
-- if (kp) {
-- long ctime[CPUSTATES];
-- static long stime[CPUSTATES];
-- static int first_time = 1;
--
-- if (first_time) {
-- first_time = 0;
--
-- if (kvm_read(kp, namelist[X_CP_TIME].n_value, stime, sizeof(stime)) == -1) {
-- uplog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kp));
--// warn("kvm_read: %s", kvm_geterr(kp));
-- }
-- else
-- sleep(1); /* to avoid the initial 0 idle value */
-- }
--
-- if (kvm_read(kp, namelist[X_CP_TIME].n_value, ctime, sizeof(ctime)) == -1) {
-- uplog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kp));
--// warn("kvm_read: %s", kvm_geterr(kp));
-- }
-- else {
-- int state;
-- double time = 0.;
--
-- for(state = 0; state < CPUSTATES; state++)
-- time += ctime[state] - stime[state];
--
-- if (time == 0.)
-- time = 1.;
--
-- *pidle = (ctime[CP_IDLE] - stime[CP_IDLE]) * 100. / time;
+ initialized = 1;
+
+ mib[0] = CTL_HW;
+@@ -98,7 +101,6 @@
+
+ if (sysctl(mib, 2, buf, &size, NULL, 0) == -1) {
+ uplog(LOG_WARNING, "sysctl: hw.model");
+- /* warn("sysctl: hw.model"); */
+ }
+ strlcpy(cpu, buf, CPU_SIZE);
+ logcalc(_("CPU"), cpu);
+@@ -154,7 +156,6 @@
+ err(1, "sysctl: kern.boottime");
+ }
+ boottimesecs = boottime.tv_sec;
+- /* logcalc(_("boot time"), boottimesecs); */
+ #if defined DEBUG
+ uplog(LOG_DEBUG, "initBoottime() initialized %d", boottimesecs);
+ #endif /* DEBUG */
+@@ -173,19 +174,18 @@
+ _("%s %s not implemented for this operating system %s"),
+ _("WARNING:"), _("Load-average"), strerror(errno));
+ cfg_SendUsage = 0;
+- return;
+ }
+ else if (loads < 0) {
+ uplog(LOG_WARNING, _("%s Could not get load-average %s"), _("WARNING:"),
+ strerror(errno));
+- return;
+ }
-
-- for(state = 0; state < CPUSTATES; state++)
-- stime[state] = ctime[state];
-- }
-- }
-- else {
-- cfg_sendidle = 0;
-- }
-+ { "_cp_time" },
-+ { NULL },
-+ };
-+
-+ if (!initialized) {
-+ char errbuf[_POSIX2_LINE_MAX];
-+ initialized = 1;
-+
-+ setgid(getgid());
-+
-+ kp = kvm_openfiles(NULL,NULL,NULL,O_RDONLY,errbuf);
-+
-+ if (!kp) {
-+ uplog(LOG_WARNING, "kvm_openfiles: %s",errbuf);
-+ /* warn("kvm_openfiles: %s",errbuf); */
-+ } else if (kvm_nlist(kp,namelist) == -1) {
-+ uplog(LOG_WARNING, "kvm_nlist: %s",kvm_geterr(kp));
-+ /* warn("kvm_nlist: %s",kvm_geterr(kp)); */
-+ }
+- /* Use the 3rd element (15 minute Load-average) */
+- *loadavg = loadavgs[2];
++ else {
++ /* Use the 3rd element (15 minute Load-average) */
++ *loadavg = loadavgs[2];
+ #if defined DEBUG
+- uplog(LOG_DEBUG, "getLoadavg() %.2f", *loadavg);
++ uplog(LOG_DEBUG, "getLoadavg() %.2f", *loadavg);
+ #endif /* DEBUG */
+ }
-+
-+ if (kp) {
-+ long ctime[CPUSTATES];
-+ static long stime[CPUSTATES];
-+ static int first_time = 1;
-+
-+ if (first_time) {
-+ first_time = 0;
-+
-+ if (kvm_read(kp, namelist[X_CP_TIME].n_value,
-+ stime, sizeof(stime)) == -1) {
-+ uplog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kp));
-+ /* warn("kvm_read: %s", kvm_geterr(kp)); */
-+ } else
-+ sleep(1); /* to avoid the initial 0 idle value */
-+ }
-+
-+ if (kvm_read(kp, namelist[X_CP_TIME].n_value,
-+ ctime, sizeof(ctime)) == -1) {
-+ uplog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kp));
-+ /* warn("kvm_read: %s", kvm_geterr(kp)); */
-+ } else {
-+ int state;
-+ double time = 0.;
-+
-+ for (state = 0; state < CPUSTATES; state++)
-+ time += ctime[state] - stime[state];
-+
-+ if (time == 0.)
-+ time = 1.;
-+
-+ *pidle = (ctime[CP_IDLE] - stime[CP_IDLE]) * 100. / time;
-+
-+ for (state = 0; state < CPUSTATES; state++)
-+ stime[state] = ctime[state];
-+ }
-+ } else {
-+ cfg_sendidle = 0;
+ }
+
+ #if !defined __MACH__ /* Mach kernel stuff is in stats-mach.c */
+@@ -245,7 +245,7 @@
+
+ for (state = 0; state < CPUSTATES; state++) {
+ time += ctime[state] - stime[state];
+- if (!(state == CPU_STATE_IDLE)) {
++ if (!(state == CP_IDLE)) {
+ nonidlecpu += (float)(ctime[state] - stime[state]);
+ }
+ }
+@@ -258,6 +258,10 @@
+
+ for (state = 0; state < CPUSTATES; state++)
+ stime[state] = ctime[state];
++#if defined DEBUG
++ uplog(LOG_DEBUG, "getLoadIdle() load=%.1f idle=%.1f", *UsagePercent,
++ *IdlePercent);
++#endif /* DEBUG */
+ }
+ }
+ else {
+@@ -268,17 +272,13 @@
+ cfg_SendUsage = 0;
+ cfg_SendIdle = 0;
}
-+ }
+-#if defined DEBUG
+- uplog(LOG_DEBUG, "getLoadIdle() load=%.1f idle=%.1f", *UsagePercent,
+- *IdlePercent);
+-#endif /* DEBUG */
}
--#endif /* PLATFORM_BSD */
-+
-+#endif /* PLATFORM_BSD */
+ #endif /* !__MACH__ */
+
+ void
+ getUptime(unsigned long *uptimeminutes)
+ {
+- static time_t boottimesecs;
++ time_t boottimesecs;
+
+ boottimesecs = initBoottime();
+
+@@ -293,7 +293,7 @@
+ #endif /* DEBUG */
+ }
+ else {
+- uplog(LOG_INFO, _("%s: %s failed"), _("ERROR:"),
++ uplog(LOG_ERR, _("%s %s failed"), _("ERROR:"),
+ "getUptime() boottime.tv_sec");
+ }
+ }
+@@ -306,19 +306,18 @@
+ double *IdlePercent, char *osname, char *osversion, char *cpu,
+ double *loadavg)
+ {
+- getUptime(&*uptimeminutes);
++ getUptime(uptimeminutes);
+
+ if (cfg_SendUsage || cfg_SendIdle)
+- getLoadIdle(&*UsagePercent, &*IdlePercent);
++ getLoadIdle(UsagePercent, IdlePercent);
+
+ if (cfg_sendosname || cfg_sendosversion)
+- initOS(&*osname, &*osversion);
++ initOS(osname, osversion);
+
+ if (cfg_sendcpu)
+- initCPU(&*cpu);
+-
+- /* if (cfg_sendloadavg) */
+- getLoadavg(&*loadavg);
++ initCPU(cpu);
+
++ if (cfg_sendloadavg)
++ getLoadavg(loadavg);
+ }
+ #endif /* PLATFORM_BSD */
diff --git a/misc/upclient/files/patch-transmit.c b/misc/upclient/files/patch-transmit.c
new file mode 100644
index 000000000000..1d5cdf7cc586
--- /dev/null
+++ b/misc/upclient/files/patch-transmit.c
@@ -0,0 +1,12 @@
+--- src/transmit.c.orig Sat Nov 30 03:27:16 2002
++++ src/transmit.c Wed Dec 18 03:30:45 2002
+@@ -45,8 +45,8 @@
+ #endif /* !PLATFORM_WINNT */
+
+ #if !defined PLATFORM_WINNT && !defined PLATFORM_BEOS
+-# include <arpa/inet.h> /* htons(), in_addr_t */
+ # include <netinet/in.h>
++# include <arpa/inet.h> /* htons(), in_addr_t */
+ #endif
+ /* Some Linux with old system headers might need this */
+ /* #if defined PLATFORM_LINUX
diff --git a/misc/upclient/files/patch-upchk b/misc/upclient/files/patch-upchk
index 65959204d898..6a3adb7b06d6 100644
--- a/misc/upclient/files/patch-upchk
+++ b/misc/upclient/files/patch-upchk
@@ -1,5 +1,5 @@
--- scripts/upchk.orig Mon Sep 23 19:28:31 2002
-+++ scripts/upchk Sat Oct 19 22:52:27 2002
++++ scripts/upchk Wed Dec 18 02:40:31 2002
@@ -24,7 +24,7 @@
#
diff --git a/misc/upclient/files/upclient.sh b/misc/upclient/files/upclient.sh
index f124a7f31218..549ea783dc44 100644
--- a/misc/upclient/files/upclient.sh
+++ b/misc/upclient/files/upclient.sh
@@ -22,6 +22,8 @@ config_dir=${PREFIX}/etc
config_file=${program_file}.conf
config_path=${config_dir}/${config_file}
+sample_path=${config_path}.sample
+
pid_dir=/var/run
pid_file=${program_file}.pid
pid_path=${pid_dir}/${pid_file}
@@ -54,7 +56,15 @@ start)
"${config_path}."
exit 72
fi
- ${program_path} &&
+ kw="IdleTime|OS|(OS|CPU)Level"
+ if egrep -qs "^[$ws]*Send($kw)[$ws]*=" ${config_path}
+ then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${config_path} needs to be updated" \
+ "from ${sample_path}."
+ exit 72
+ fi
+ ${program_path} 2> /dev/null &&
echo -n " ${program_file}"
;;
stop)
diff --git a/misc/upclient/pkg-plist b/misc/upclient/pkg-plist
index ba5ddbc131f8..360471239a8e 100644
--- a/misc/upclient/pkg-plist
+++ b/misc/upclient/pkg-plist
@@ -3,6 +3,7 @@ etc/rc.d/upclient.sh
@unexec if cmp -s %D/etc/upclient.conf %D/etc/upclient.conf.sample; then rm -f %D/etc/upclient.conf; fi
etc/upclient.conf.sample
@exec [ -f %D/etc/upclient.conf ] || cp -p %D/etc/upclient.conf.sample %D/etc/upclient.conf
+sbin/clientchk
sbin/upchk
sbin/upclient
%%PORTDOCS%%share/doc/upclient/AUTHORS
@@ -13,4 +14,7 @@ sbin/upclient
%%PORTDOCS%%share/doc/upclient/INSTALL
%%PORTDOCS%%share/doc/upclient/README
%%PORTDOCS%%share/doc/upclient/TODO
+%%PORTDOCS%%share/doc/upclient/UptimesProtocol5
+share/locale/de/LC_MESSAGES/upclient.mo
+share/locale/fr/LC_MESSAGES/upclient.mo
%%PORTDOCS%%@dirrm share/doc/upclient