Date: Mon, 19 Jan 2009 15:41:01 GMT From: Murilo Opsfelder <mopsfelder@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/130748: [MAINTAINER] devel/p5-Unix-Uptime: Makes $boot_seconds be assigned correctly Message-ID: <200901191541.n0JFf1Bl070555@www.freebsd.org> Resent-Message-ID: <200901191550.n0JFo0Ht076525@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 130748 >Category: ports >Synopsis: [MAINTAINER] devel/p5-Unix-Uptime: Makes $boot_seconds be assigned correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Jan 19 15:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Murilo Opsfelder >Release: FreeBSD 8.0 i386 >Organization: BluePex Security Solutions >Environment: FreeBSD opsfelder.bplab.local 8.0-CURRENT FreeBSD 8.0-CURRENT #37 r187296: Thu Jan 15 10:08:42 BRST 2009 root@opsfelderm.bplab.local:/usr/obj/usr/src/sys/PANDA i386 >Description: Before patch, $boot_seconds only received 1 for a successfully string matching or 0 for a failed string matching. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/devel/p5-Unix-Uptime/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 19 Jan 2009 12:50:11 -0000 1.1 +++ Makefile 19 Jan 2009 15:28:16 -0000 @@ -7,6 +7,7 @@ PORTNAME= Unix-Uptime PORTVERSION= 0.1 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- Index: files/patch-lib__Unix__Uptime.pm =================================================================== RCS file: files/patch-lib__Unix__Uptime.pm diff -N files/patch-lib__Unix__Uptime.pm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-lib__Unix__Uptime.pm 19 Jan 2009 15:28:16 -0000 @@ -0,0 +1,12 @@ +--- lib/Unix/Uptime.pm.orig 2009-01-19 13:22:27.000000000 -0200 ++++ lib/Unix/Uptime.pm 2009-01-19 13:23:38.000000000 -0200 +@@ -62,7 +62,8 @@ + my $class = shift; + + my $boottime = `sysctl kern.boottime`; +- my $boot_seconds = $boottime =~ /\s+sec\s+=\s+(\d+),/; ++ $boottime =~ /\s+sec\s+=\s+(\d+),/; ++ my $boot_seconds = $1; + my $time = time(); + my $uptime = $time - $boot_seconds; + return $uptime; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901191541.n0JFf1Bl070555>