Skip to content

Commit

Permalink
Merge pull request #91 from mariux64/replace-perl
Browse files Browse the repository at this point in the history
Use system perl
  • Loading branch information
donald authored May 17, 2019
2 parents deafc12 + da9e5eb commit f264676
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 25 deletions.
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

0 comments on commit f264676

Please sign in to comment.