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:
parent
0b7decef51
commit
0e6120ac13
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226430
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= Unix-Uptime
|
||||
PORTVERSION= 0.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
12
devel/p5-Unix-Uptime/files/patch-lib__Unix__Uptime.pm
Normal file
12
devel/p5-Unix-Uptime/files/patch-lib__Unix__Uptime.pm
Normal 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;
|
Loading…
Reference in New Issue
Block a user