Changeset 32674


Ignore:
Timestamp:
2012-07-12T10:09:57+02:00 (6 years ago)
Author:
acinonyx
Message:

[packages] monit: Bump to 5.4 and bugfixes

Hi
this patch update monit from 5.2.5 to 5.4, this add cool feature like "check program", to execute a script and send email/do action depending on the return code, and many bugfixes (http://mmonit.com/monit/dist/CHANGES.txt)
I've modified the init script because "-d 60" overide the conf file and the stat command doesn't seem to exist, so either we just chmod each time or we let the people RTFM and the syslog (i prefer the latter)

For now i've tested only the ssl version with backfire (r31676) on x86 and ar71xx (tplink wr1043nd) (it send mail via google, ping, watch load average and cpu ...)
It compile (monit and monit-nossl) for x86 and ar71xx for backfire & trunk (trunk x86 mount the ext4 partition readonly so i haven't tested)

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@…>
Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@…>

Location:
packages/admin/monit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • packages/admin/monit/Makefile

    r28887 r32674  
    99 
    1010PKG_NAME:=monit 
    11 PKG_VERSION:=5.2.5 
    12 PKG_RELEASE:=2 
     11PKG_VERSION:=5.4 
     12PKG_RELEASE:=1 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1515PKG_SOURCE_URL:=http://mmonit.com/monit/dist 
    16 PKG_MD5SUM:=862fb7939ad6f73fc0cc82096c2309c7 
     16PKG_MD5SUM:=f1f391241d44059d0d3e5d26f4ec5ddf 
    1717 
    1818PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) 
     
    5656endef 
    5757 
     58CONFIGURE_ARGS += \ 
     59        --without-pam \ 
     60        libmonit_cv_setjmp_available=yes \ 
     61        libmonit_cv_vsnprintf_c99_conformant=yes 
     62 
    5863ifeq ($(BUILD_VARIANT),ssl) 
    5964        CONFIGURE_ARGS += \ 
  • packages/admin/monit/files/monit.init

    r28887 r32674  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006-2011 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
    33 
    44START=60 
     
    88start() { 
    99        [ -f /etc/monitrc ] || return 1 
    10         [ "$(stat -c "%a" /etc/monitrc)" = "0700" ] || chmod 0700 /etc/monitrc 
    11         service_start /usr/bin/monit -d 60 
     10        #chmod 0700 /etc/monitrc 
     11        service_start /usr/bin/monit 
    1212} 
    1313 
  • packages/admin/monit/patches/001-no_sslv2.patch

    r25867 r32674  
    1 --- a/ssl.c 
    2 +++ b/ssl.c 
    3 @@ -635,6 +635,7 @@ ssl_connection *new_ssl_connection(char 
    4  #endif 
    5      break; 
    6   
    7 +#ifndef OPENSSL_NO_SSLV2 
    8    case SSL_VERSION_SSLV2: 
    9  #ifdef OPENSSL_FIPS 
    10      if (FIPS_mode()) { 
    11 @@ -647,6 +648,7 @@ ssl_connection *new_ssl_connection(char 
    12      } 
    13  #endif 
    14      break; 
    15 +#endif 
    16   
    17    case SSL_VERSION_SSLV3: 
    18  #ifdef OPENSSL_FIPS 
  • packages/admin/monit/patches/002-uclibc_loadavg.patch

    r25867 r32674  
    1 --- a/process/sysdep_LINUX.c 
    2 +++ b/process/sysdep_LINUX.c 
    3 @@ -144,6 +144,45 @@ static time_t get_starttime() { 
    4   
    5    return time(NULL) - (time_t)up; 
    6  } 
    7 + 
    8 + 
    9 +/* uclibc and dietlibc do not have this junk -ReneR */ 
    10 +#if defined (__UCLIBC__) || defined (__dietlibc__) 
    11 +static int getloadavg (double loadavg[], int nelem) 
    12 +{ 
    13 +  int fd; 
    14 + 
    15 +  fd = open ("/proc/loadavg", O_RDONLY); 
    16 +  if (fd < 0) 
    17 +    return -1; 
    18 +  else 
    19 +    { 
    20 +      char buf[65], *p; 
    21 +      ssize_t nread; 
    22 +      int i; 
    23 + 
    24 +      nread = read (fd, buf, sizeof buf - 1); 
    25 +      close (fd); 
    26 +      if (nread <= 0) 
    27 +       return -1; 
    28 +      buf[nread - 1] = '\0'; 
    29 + 
    30 +      if (nelem > 3) 
    31 +       nelem = 3; 
    32 +      p = buf; 
    33 +      for (i = 0; i < nelem; ++i) 
    34 +       { 
    35 +         char *endp; 
    36 +         loadavg[i] = strtod (p, &endp); 
    37 +         if (endp == p) 
    38 +           return -1; 
    39 +         p = endp; 
    40 +       } 
    41 + 
    42 +      return i; 
    43 +    } 
    44 +} 
    45 +#endif 
    46     
    47   
    48  /* ------------------------------------------------------------------ Public */ 
Note: See TracChangeset for help on using the changeset viewer.