Skip to content

Use system perl #91

Merged
merged 1 commit into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clusterd/clusterd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl

use warnings;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion kvm_monitor/kvm_monitor.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#! /usr/local/system/perl/bin/perl -w

use strict;
# use Data::Dumper; $Data::Dumper::Sortkeys=1;
Expand Down
2 changes: 1 addition & 1 deletion make-automaps/make-automaps
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl

use strict;
use warnings;
Expand Down
2 changes: 1 addition & 1 deletion mkmotd/mkmotd.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion mxgrub/mxgrub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;
use Getopt::Long;
Expand Down
14 changes: 3 additions & 11 deletions mxmirror/mxmirror
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/perl
#! /usr/local/system/perl/bin/perl

use Socket;
use Sys::Hostname;
use Getopt::Long;
use Date::Calc;

use strict;
use warnings;
Expand Down Expand Up @@ -237,23 +236,16 @@ sub mirrors_reverse {
sub get_mirror_status {
my $mirror = shift;

my $status;
my $days;

return 'REMOTE' unless($hostname eq $mirror->{destination}->{host});

if(open(F, '<', "$mirror->{destination}->{hostpath}/.PMIRROR_STATUS")) {
my $line = <F>;
close F;

($status, $days) = $line =~ /^(\S+) (\d+) /;
my ($status, $timestamp) = $line =~ /^(\S+) (\d+) /;

if($status eq 'OK') {
my ($year,$month,$day, $hour,$min,$sec, $doy,$dow,$dst) = Date::Calc::Gmtime($days);

$days = Date::Calc::Delta_Days($year,$month,$day, Date::Calc::Today());

return $days;
return sprintf ("%2.2f",(time()-$timestamp)/24/60/60);
}

return $line;
Expand Down
2 changes: 1 addition & 1 deletion mxnetctl/mxnetctl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion mxraid/mxraid_assemble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl -w
#! /usr/local/system/perl/bin/perl -w

use strict;

Expand Down
2 changes: 1 addition & 1 deletion mxrouter/mxrouterctl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion mxvlan/mxvlanctl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion netlog/netlog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl

use warnings;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion pdist/pdist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl

# https://github.molgen.mpg.de/mariux64/mxtools

Expand Down
2 changes: 1 addition & 1 deletion pkgadmin/pkgadmin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion pmirror/pmirror
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/local/system/perl/bin/perl

# https://github.molgen.mpg.de/mariux64/mxtools

Expand Down
2 changes: 1 addition & 1 deletion put_websafe/put_websafe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/local/bin/perl -w
#! /usr/local/system/perl/bin/perl -w
use strict;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST $DYNAMIC_FILE_UPLOAD);
Expand Down