diff options
-rw-r--r-- | perl-install/fs.pm | 6 | ||||
-rw-r--r-- | perl-install/network/smb.pm | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index a797977d6..0f757f888 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -69,8 +69,7 @@ sub read_fstab { # prefering type "smbfs" over "smb" $fs_type = 'smbfs'; } - $mntpoint =~ s/\\040/ /g; - $dev =~ s/\\040/ /g; + s/\\040/ /g foreach $mntpoint, $dev, $options; my $h = { mntpoint => $mntpoint, fs_type => $fs_type, @@ -330,8 +329,7 @@ sub prepare_write_fstab { my $fs_type = $_->{fs_type} || 'auto'; - $mntpoint =~ s/ /\\040/g; - $device =~ s/ /\\040/g; + s/ /\\040/g foreach $mntpoint, $device, $options; # handle bloody supermount special case if ($options =~ /supermount/) { diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm index af201fe68..ef98f6945 100644 --- a/perl-install/network/smb.pm +++ b/perl-install/network/smb.pm @@ -39,11 +39,11 @@ sub smbclient { my ($server) = @_; my $name = $server->{name} || $server->{ip}; my $ip = $server->{ip} ? "-I $server->{ip}" : ''; - my $group = $server->{group} ? " -W $server->{group}" : ''; + my $group = $server->{group} ? qq( -W "$server->{group}") : ''; my $U = $server->{username} ? sprintf("%s/%s%%%s", @$server{'domain', 'username', 'password'}) : '%'; my %h; - foreach (`smbclient -g -U $U -L $name $ip$group 2>/dev/null`) { + foreach (`smbclient -g -U "$U" -L "$name" $ip$group 2>/dev/null`) { if (my ($type, $v1, $v2) = /(.*)\|(.*)\|(.*)/) { push @{$h{$type}}, [ $v1, $v2 ]; } elsif (/^Error returning browse list/) { |