1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

- Fix $boot_seconds set, previously it was recieving just a boolean return

instead the seconds.
- Bump PORTREVISION

PR:		ports/130748
Submitted by:	maintainer
This commit is contained in:
Renato Botelho 2009-01-19 16:01:34 +00:00
parent 0b7decef51
commit 0e6120ac13
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226430
2 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= Unix-Uptime
PORTVERSION= 0.1
PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-

View File

@ -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;