summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/fileshareset
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-23 16:10:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-23 16:10:03 +0000
commitd6f5330ee63311a3e5c8ef52693ac7193ea83ede (patch)
tree597f252be23c47345b40109c08f58b8fa849b524 /perl-install/standalone/fileshareset
parent9731f6a53e8701039a1fa0102427fbdd5eb60df0 (diff)
downloaddrakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.gz
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.bz2
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.xz
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.zip
perl_checker fixes
Diffstat (limited to 'perl-install/standalone/fileshareset')
-rwxr-xr-xperl-install/standalone/fileshareset14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/standalone/fileshareset b/perl-install/standalone/fileshareset
index 18277d95f..51f4625d3 100755
--- a/perl-install/standalone/fileshareset
+++ b/perl-install/standalone/fileshareset
@@ -84,10 +84,10 @@ if ($modify) {
if ($cmd eq '--add') {
my @errs = map { eval { $_->add($dir) }; $@ } @exports;
- grep { !$_ } @errs or error("already exported");
+ any { !$_ } @errs or error("already exported");
} else {
my @errs = map { eval { $_->remove($dir) }; $@ } @exports;
- grep { !$_ } @errs or error("not exported");
+ any { !$_ } @errs or error("not exported");
}
foreach my $export (@exports) {
$export->write;
@@ -189,7 +189,7 @@ package nfs_exports;
use vars qw(@ISA $conf_file $default_options);
BEGIN { @ISA = 'exports' }
-sub read {
+sub read() {
my $file = $conf_file;
local *F;
open F, $file or return [];
@@ -253,7 +253,7 @@ sub write {
print F $_->{raw} foreach @$nfs_exports;
}
-sub update_server {
+sub update_server() {
if (fork()) {
system('/usr/sbin/exportfs', '-r');
if (system('/sbin/pidof rpc.mountd >/dev/null') != 0 ||
@@ -272,7 +272,7 @@ package smb_exports;
use vars qw(@ISA $conf_file);
BEGIN { @ISA = 'exports' }
-sub read {
+sub read() {
my ($s, @l);
local *F;
open F, $conf_file;
@@ -338,7 +338,7 @@ sub name_mangle {
# 4. if size is too big, shorten it
while (length > 12) {
my ($s) = m|.*?/(.*)|;
- if (length($s) > 8 && !grep { /\Q$s/ } @others) {
+ if (length($s) > 8 && !any { /\Q$s/ } @others) {
# dropping leading directories when the resulting is still long and meaningful
$_ = $s;
next;
@@ -376,7 +376,7 @@ sub name_mangle {
$_;
}
-sub update_server {
+sub update_server() {
if (fork()) {
system('/usr/bin/killall -HUP smbd 2>/dev/null');
if (system('/sbin/pidof smbd >/dev/null') != 0 ||