diff options
author | Chris Rees <crees@FreeBSD.org> | 2012-09-19 19:07:36 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2012-09-19 19:07:36 +0000 |
commit | dd4f0bcc3b6b6803b7e90f7a2b3ef1d04adc330a (patch) | |
tree | 8cd0f939b02583063e9becbf857955ec73357d85 /sysutils/monitorix | |
parent | f624c861669667b6d8f765f7d6f72f4f266381ab (diff) | |
download | ports-dd4f0bcc3b6b6803b7e90f7a2b3ef1d04adc330a.tar.gz ports-dd4f0bcc3b6b6803b7e90f7a2b3ef1d04adc330a.zip |
Notes
Diffstat (limited to 'sysutils/monitorix')
-rw-r--r-- | sysutils/monitorix/Makefile | 15 | ||||
-rw-r--r-- | sysutils/monitorix/distinfo | 4 | ||||
-rw-r--r-- | sysutils/monitorix/files/patch-monitorix | 44 |
3 files changed, 28 insertions, 35 deletions
diff --git a/sysutils/monitorix/Makefile b/sysutils/monitorix/Makefile index 692dbd70bd7d..cb0fe331553c 100644 --- a/sysutils/monitorix/Makefile +++ b/sysutils/monitorix/Makefile @@ -6,8 +6,7 @@ # PORTNAME= monitorix -PORTVERSION= 2.5.2 -PORTREVISION?= 2 +PORTVERSION= 2.6.0 CATEGORIES= sysutils MASTER_SITES= http://www.monitorix.org/ \ http://www.monitorix.org/old_versions/ \ @@ -22,7 +21,8 @@ LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool RUN_DEPENDS= p5-ParallelUA>=0:${PORTSDIR}/www/p5-ParallelUA \ p5-CGI.pm>=0:${PORTSDIR}/www/p5-CGI.pm \ p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ - p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite + p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \ + p5-XML-Simple>=0:${PORTSDIR}/textproc/p5-XML-Simple USE_PERL5= 5.12+ MAN5= monitorix.conf.5 @@ -63,7 +63,7 @@ pre-everything:: post-patch: .for f in monitorix.cgi monitorix.conf monitorix reports/send_reports - @${REINPLACE_CMD} -e "1s|^\(#!\).*|\1${PERL}|" \ + @${REINPLACE_CMD} -e "1s|^\(#!\).*|\1/usr/bin/env perl|" \ ${WRKSRC}/${f} .endfor # eth0 doesn't exist in FreeBSD! Also let's set our own paths. @@ -80,8 +80,8 @@ post-patch: do-install: @${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/bin/ - @${MKDIR} ${WWWDIR}/imgs - @${CHOWN} ${WWW_OWNER}:${WWW_GROUP} ${WWWDIR}/imgs + @${MKDIR} ${WWWDIR} + @${INSTALL} -d -o ${WWW_OWNER} -g ${WWW_GROUP} ${WWWDIR}/imgs .for f in ${WWW_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${WWWDIR}/ .endfor @@ -107,7 +107,8 @@ do-install: post-install: @${MKDIR} ${DATADIR} @${MKDIR} ${WWWDIR}/usage - @${INSTALL_DATA} ${WRKSRC}/monitorix.conf ${PREFIX}/etc/monitorix.conf.sample + @${INSTALL_DATA} ${WRKSRC}/monitorix.conf \ + ${PREFIX}/etc/monitorix.conf.sample @if [ ! -f ${PREFIX}/etc/monitorix.conf ]; then \ ${CP} -p ${PREFIX}/etc/monitorix.conf.sample \ ${PREFIX}/etc/monitorix.conf ; \ diff --git a/sysutils/monitorix/distinfo b/sysutils/monitorix/distinfo index 346067ea33b9..25c13be25cda 100644 --- a/sysutils/monitorix/distinfo +++ b/sysutils/monitorix/distinfo @@ -1,2 +1,2 @@ -SHA256 (monitorix-2.5.2.tar.gz) = 8e059886b6a14cff50b022960571c935604eba6b4d92151bbd4d27c5a0cb9ea2 -SIZE (monitorix-2.5.2.tar.gz) = 127155 +SHA256 (monitorix-2.6.0.tar.gz) = 0e909a06fd5156d7f2b6604da9175dc5d79309b29d2c904c479eb2fb2d1f5c23 +SIZE (monitorix-2.6.0.tar.gz) = 137386 diff --git a/sysutils/monitorix/files/patch-monitorix b/sysutils/monitorix/files/patch-monitorix index e8362975a48b..1553a5041a4a 100644 --- a/sysutils/monitorix/files/patch-monitorix +++ b/sysutils/monitorix/files/patch-monitorix @@ -1,27 +1,19 @@ ---- monitorix.orig 2011-05-04 18:19:58.792045586 +0100 -+++ monitorix 2011-05-04 18:46:51.729913889 +0100 -@@ -1654,10 +1654,8 @@ - alarm $TIMEOUT; - open(IN, "df -P / |"); - while(<IN>) { -- if(/dev/ && /\//) { -- ($root_disk) = split(' ', $_); -- last; -- } -+ next if /Filesystem/; -+ ($root_disk) = split; - } - close(IN); - alarm 0; -@@ -1734,9 +1732,8 @@ +--- monitorix.orig 2012-09-19 19:10:51.216974158 +0100 ++++ monitorix 2012-09-19 19:32:41.617971604 +0100 +@@ -2293,8 +2293,14 @@ + } + } + } elsif($os eq "FreeBSD" || $os eq "OpenBSD" || $os eq "NetBSD") { +- $d =~ s/^.*dev\///; # remove the /dev/ prefix +- $d =~ s/^(...).*/\1/; # get the first 3 chars ++ # remove the /dev/ prefix ++ if ($d =~ s/^.*dev\///) { ++ # not ZFS; get the device name, eg ada0; md0; ad10 ++ $d =~ s/^(\D+\d*)\D.*/\1/; ++ } else { ++ # Just take ZFS pool name ++ $d =~ s,^([^/]*)/.*,\1,; ++ } } - } - } elsif($os eq "FreeBSD") { -- $root_disk =~ s/^.*dev\///; # remove the /dev/ prefix --# $root_disk =~ s/.*\///; # removes /dev/ -- $root_disk =~ s/...$//; # removes part number -+ $root_disk =~ s/^.dev.//; # remove the /dev/ prefix -+ $root_disk =~ s/[sp][0-9][a-z]?$//; # removes part number - } - - # do exists in /proc/diskstats? + $FS_DEV{$fs} = $d; + logger("$myself: Detected physical device name for $fs in '$d'.") unless !$opt_d; |