include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.2.5
-PKG_RELEASE:=2
+PKG_VERSION:=5.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=862fb7939ad6f73fc0cc82096c2309c7
+PKG_MD5SUM:=f1f391241d44059d0d3e5d26f4ec5ddf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
This package is built without SSL support.
endef
+CONFIGURE_ARGS += \
+ --without-pam \
+ libmonit_cv_setjmp_available=yes \
+ libmonit_cv_vsnprintf_c99_conformant=yes
+
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS += \
--with-ssl \
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
START=60
start() {
[ -f /etc/monitrc ] || return 1
- [ "$(stat -c "%a" /etc/monitrc)" = "0700" ] || chmod 0700 /etc/monitrc
- service_start /usr/bin/monit -d 60
+ #chmod 0700 /etc/monitrc
+ service_start /usr/bin/monit
}
stop() {
---- a/ssl.c
-+++ b/ssl.c
-@@ -635,6 +635,7 @@ ssl_connection *new_ssl_connection(char
- #endif
- break;
-
-+#ifndef OPENSSL_NO_SSLV2
- case SSL_VERSION_SSLV2:
- #ifdef OPENSSL_FIPS
- if (FIPS_mode()) {
-@@ -647,6 +648,7 @@ ssl_connection *new_ssl_connection(char
- }
- #endif
- break;
-+#endif
-
- case SSL_VERSION_SSLV3:
- #ifdef OPENSSL_FIPS
---- a/process/sysdep_LINUX.c
-+++ b/process/sysdep_LINUX.c
-@@ -144,6 +144,45 @@ static time_t get_starttime() {
-
- return time(NULL) - (time_t)up;
- }
-+
-+
-+/* uclibc and dietlibc do not have this junk -ReneR */
-+#if defined (__UCLIBC__) || defined (__dietlibc__)
-+static int getloadavg (double loadavg[], int nelem)
-+{
-+ int fd;
-+
-+ fd = open ("/proc/loadavg", O_RDONLY);
-+ if (fd < 0)
-+ return -1;
-+ else
-+ {
-+ char buf[65], *p;
-+ ssize_t nread;
-+ int i;
-+
-+ nread = read (fd, buf, sizeof buf - 1);
-+ close (fd);
-+ if (nread <= 0)
-+ return -1;
-+ buf[nread - 1] = '\0';
-+
-+ if (nelem > 3)
-+ nelem = 3;
-+ p = buf;
-+ for (i = 0; i < nelem; ++i)
-+ {
-+ char *endp;
-+ loadavg[i] = strtod (p, &endp);
-+ if (endp == p)
-+ return -1;
-+ p = endp;
-+ }
-+
-+ return i;
-+ }
-+}
-+#endif
-
-
- /* ------------------------------------------------------------------ Public */