From b2f428a914854277bac8dd40556d4ab9ed6caa1f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 Feb 2003 11:27:06 +0000 Subject: cleanup --- perl-install/standalone/fileshareset | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install/standalone/fileshareset') diff --git a/perl-install/standalone/fileshareset b/perl-install/standalone/fileshareset index 5e2dca0ea..18277d95f 100755 --- a/perl-install/standalone/fileshareset +++ b/perl-install/standalone/fileshareset @@ -45,7 +45,7 @@ To grant you the rights: - or put user "$username" in group "$authorisation_group"); my $no_export_method = "can't export anything: no nfs, no smb"; -my %exit_codes = reverse ( +my %exit_codes = reverse( 1 => $non_authorised, 2 => $usage, @@ -94,7 +94,7 @@ if ($modify) { $export->update_server; } } -my @mntpoints = grep {$_} uniq(map { map { $_->{mntpoint} } @$_ } @exports); +my @mntpoints = grep { $_ } uniq(map { map { $_->{mntpoint} } @$_ } @exports); print "$_\n" foreach grep { own($_) } @mntpoints; @@ -194,7 +194,7 @@ sub read { local *F; open F, $file or return []; - my ($prev_raw, $prev_line, %e, @l); + my ($prev_raw, $prev_line, @l); my $line_nb = 0; foreach my $raw () { $line_nb++; @@ -254,7 +254,7 @@ sub write { } sub update_server { - if (fork) { + if (fork()) { system('/usr/sbin/exportfs', '-r'); if (system('/sbin/pidof rpc.mountd >/dev/null') != 0 || system('/sbin/pidof nfsd >/dev/null') != 0) { @@ -377,7 +377,7 @@ sub name_mangle { } sub update_server { - if (fork) { + if (fork()) { system('/usr/bin/killall -HUP smbd 2>/dev/null'); if (system('/sbin/pidof smbd >/dev/null') != 0 || system('/sbin/pidof nmbd >/dev/null') != 0) { -- cgit v1.2.1