projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added sys alias
[clearscm.git]
/
clearadm
/
updatefs.pl
diff --git
a/clearadm/updatefs.pl
b/clearadm/updatefs.pl
index
caa7d07
..
6308e35
100755
(executable)
--- a/
clearadm/updatefs.pl
+++ b/
clearadm/updatefs.pl
@@
-73,17
+73,17
@@
my $clearexec = Clearexec->new;
my ($host, $fs);
# Given a host and a filesystem, formulate a fs record
my ($host, $fs);
# Given a host and a filesystem, formulate a fs record
-sub snapshotFS
($$) {
+sub snapshotFS($$) {
my ($systemRef, $filesystem) = @_;
my %system = %{$systemRef};
my ($systemRef, $filesystem) = @_;
my %system = %{$systemRef};
- my %filesystem = $clearadm->GetFilesystem
($system{name}, $filesystem);
+ my %filesystem = $clearadm->GetFilesystem($system{name}, $filesystem);
unless (%filesystem) {
unless (%filesystem) {
-
error "Filesystem $host:$filesystem not in clearadm database - try adding it";
-
-
return;
+ error "Filesystem $host:$filesystem not in clearadm database - try adding it";
+
+ return;
} # unless
my %fs = (
} # unless
my %fs = (
@@
-101,8
+101,8
@@
sub snapshotFS ($$) {
if ($status != 0) {
error ('Unable to determine fsinfo for '
if ($status != 0) {
error ('Unable to determine fsinfo for '
- . "$system{name}:$filesystem{mount} ($cmd)\n"
.
-
join "\n", @unixfs);
+ . "$system{name}:$filesystem{mount} ($cmd)\n"
+
.
join "\n", @unixfs);
return;
} # if
return;
} # if
@@
-149,7
+149,7
@@
sub snapshotFS ($$) {
} # snapshotFS
# Main
} # snapshotFS
# Main
-GetOptions
(
+GetOptions(
'usage' => sub { Usage },
'verbose' => sub { set_verbose },
'debug' => sub { set_debug },
'usage' => sub { Usage },
'verbose' => sub { set_verbose },
'debug' => sub { set_debug },
@@
-157,8
+157,7
@@
GetOptions (
'fs=s' => \$fs,
) or Usage "Invalid parameter";
'fs=s' => \$fs,
) or Usage "Invalid parameter";
-Usage 'Extraneous options: ' . join ' ', @ARGV
- if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
# Announce ourselves
verbose "$FindBin::Script V$VERSION";
# Announce ourselves
verbose "$FindBin::Script V$VERSION";
@@
-168,7
+167,7
@@
my $exit = 0;
for my $system ($clearadm->FindSystem ($host)) {
next if $system->{active} eq 'false';
for my $system ($clearadm->FindSystem ($host)) {
next if $system->{active} eq 'false';
- my $status = $clearexec->connectToServer
(
+ my $status = $clearexec->connectToServer(
$system->{name},
$system->{port}
);
$system->{name},
$system->{port}
);
@@
-181,10
+180,10
@@
for my $system ($clearadm->FindSystem ($host)) {
for my $filesystem ($clearadm->FindFilesystem ($system->{name}, $fs)) {
verbose "Snapshotting $system->{name}:$filesystem->{filesystem}";
for my $filesystem ($clearadm->FindFilesystem ($system->{name}, $fs)) {
verbose "Snapshotting $system->{name}:$filesystem->{filesystem}";
- my %fs = snapshotFS
($system, $filesystem->{filesystem});
+ my %fs = snapshotFS($system, $filesystem->{filesystem});
if (%fs) {
if (%fs) {
- my ($err, $msg) = $clearadm->AddFS
(%fs);
+ my ($err, $msg) = $clearadm->AddFS(%fs);
error $msg, $err if $err;
} # if
error $msg, $err if $err;
} # if
@@
-211,7
+210,7
@@
for my $system ($clearadm->FindSystem ($host)) {
error "Unable to update filesystem record $msg", $err if $err;
# Check if over threshold
error "Unable to update filesystem record $msg", $err if $err;
# Check if over threshold
- my %notification = $clearadm->GetNotification
('Filesystem');
+ my %notification = $clearadm->GetNotification('Filesystem');
next unless %notification;
next unless %notification;