Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
fix some perl warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed May 27, 2013
1 parent 02aec98 commit 258a2a8
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions mxmount
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ use Sys::Hostname;
use Data::Dumper;
use Socket;

use warnings;

########################################

my $configfile="/etc/mxmounts";
my $exports="/etc/exports";
my $configfile = "/etc/mxmounts";
my $exports = "/etc/exports";

########################################

my $tag = "# DO NOT EDIT BELOW THIS LINE # created by /usr/bin/mxmount #";

my $fullhostname, $hostname;
my @lines,@exports;
my %V, %D;
my $fullhostname;
my $hostname;
my @lines;
my @exports;
my %V;
my %D;

$fullhostname = hostname();
($hostname) = $fullhostname =~ /^(.*?)\./;
Expand Down Expand Up @@ -100,7 +105,7 @@ sub create_exports {
sub mount_all {
my $allmp = $D{$hostname};
my @CMD;
foreach my $mp (sort { $a->{mountpoint} <=> $b->{mountpoint} } @$allmp) {
foreach my $mp (sort { $a->{mountpoint} cmp $b->{mountpoint} } @$allmp) {

@CMD = ();

Expand Down Expand Up @@ -202,7 +207,7 @@ sub parse_variables {
my @lines = @_;
my @invalid = ();

my $key, $value;
my ($key, $value);

foreach(@lines) {
if(($key, $value) = /^(\S+)=\s*(.*)$/) {
Expand Down

0 comments on commit 258a2a8

Please sign in to comment.