summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/fileshareset
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/fileshareset')
-rwxr-xr-xperl-install/standalone/fileshareset7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/standalone/fileshareset b/perl-install/standalone/fileshareset
index b5dcbfb16..9223d6f29 100755
--- a/perl-install/standalone/fileshareset
+++ b/perl-install/standalone/fileshareset
@@ -11,7 +11,6 @@ my $authorisation_group = 'fileshare';
########################################
-# fileshare utility $Id: fileshareset 233183 2008-01-23 12:17:07Z tv $
# Copyright (C) 2001-2008 Mandriva (pixel)
#
# This program is free software; you can redistribute it and/or modify
@@ -93,7 +92,7 @@ my @exports = (
if ($modify) {
my ($cmd, $dir) = @ARGV;
$< = $>;
- @ARGV == 2 && ($cmd eq '--add' || $cmd eq '--remove') or error($usage);
+ @ARGV == 2 && (member($cmd, qw(--add --remove))) or error($usage);
verify_mntpoint($dir);
@@ -180,7 +179,7 @@ sub check {
################################################################################
package exports;
-sub find {
+sub _find {
my ($exports, $mntpoint) = @_;
foreach (@$exports) {
$_->{mntpoint} eq $mntpoint and return $_;
@@ -190,7 +189,7 @@ sub find {
sub add {
my ($exports, $mntpoint) = @_;
- find($exports, $mntpoint) and die 'add';
+ _find($exports, $mntpoint) and die 'add';
push @$exports, my $e = { mntpoint => $mntpoint };
$e;
}