summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 22:11:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 22:11:19 +0000
commit35ed07395593b5e85aaa16289218d09df1af868d (patch)
treeaa4c0666f7ea6c2c89f31596414e19955c06da1e /urpm
parentfc184895703ffc0f3ad09df93227caae553a6cf5 (diff)
downloadurpmi-35ed07395593b5e85aaa16289218d09df1af868d.tar
urpmi-35ed07395593b5e85aaa16289218d09df1af868d.tar.gz
urpmi-35ed07395593b5e85aaa16289218d09df1af868d.tar.bz2
urpmi-35ed07395593b5e85aaa16289218d09df1af868d.tar.xz
urpmi-35ed07395593b5e85aaa16289218d09df1af868d.zip
rename $_ into $mntpoint
Diffstat (limited to 'urpm')
-rw-r--r--urpm/removable.pm24
1 files changed, 12 insertions, 12 deletions
diff --git a/urpm/removable.pm b/urpm/removable.pm
index e882dff0..80bfbd20 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -29,17 +29,17 @@ sub try_mounting {
? ($dir = urpm::sys::trim_until_d($dir))
: _non_mounted_mntpoints($dir);
- foreach (@mntpoints) {
- $urpm->{log}(N("mounting %s", $_));
+ foreach my $mntpoint (@mntpoints) {
+ $urpm->{log}(N("mounting %s", $mntpoint));
if ($is_iso) {
#- to mount an iso image, grab the first loop device
my $loopdev = urpm::sys::first_free_loopdev();
- sys_log("mount iso $_ on $o_removable");
- $loopdev and system('mount', $o_removable, $_, '-t', 'iso9660', '-o', "loop=$loopdev");
- $o_removable and $urpm->{removable_mounted}{$_} = undef;
+ sys_log("mount iso $mntpoint on $o_removable");
+ $loopdev and system('mount', $o_removable, $mntpoint, '-t', 'iso9660', '-o', "loop=$loopdev");
+ $o_removable and $urpm->{removable_mounted}{$mntpoint} = undef;
} else {
- sys_log("mount $_");
- system("mount '$_' 2>/dev/null");
+ sys_log("mount $mntpoint");
+ system("mount '$mntpoint' 2>/dev/null");
}
}
-e $dir;
@@ -49,11 +49,11 @@ sub try_mounting {
sub try_umounting {
my ($urpm, $dir) = @_;
- foreach (reverse _mounted_mntpoints($dir)) {
- $urpm->{log}(N("unmounting %s", $_));
- sys_log("umount $_");
- system("umount '$_' 2>/dev/null");
- delete $urpm->{removable_mounted}{$_};
+ foreach my $mntpoint (reverse _mounted_mntpoints($dir)) {
+ $urpm->{log}(N("unmounting %s", $mntpoint));
+ sys_log("umount $mntpoint");
+ system("umount '$mntpoint' 2>/dev/null");
+ delete $urpm->{removable_mounted}{$mntpoint};
}
! -e $dir;
}