summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-12 12:05:22 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-12 12:05:22 +0000
commit665d9ad8aa8b8a71198ef8b6cae00e94b9244391 (patch)
treeb0dda9c2bb7e22f6922a67aacc1b201050142fba /perl-install/devices.pm
parentff64e6601b57962132cc0be8b7f8d70b86392ac0 (diff)
downloaddrakx-backup-do-not-use-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar
drakx-backup-do-not-use-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.gz
drakx-backup-do-not-use-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.bz2
drakx-backup-do-not-use-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.xz
drakx-backup-do-not-use-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.zip
no_comment
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 704b3d40d..9346b687e 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -38,9 +38,11 @@ sub size($) {
sub make($) {
local $_ = my $file = $_[0];
my ($type, $major, $minor);
+ my ($prefix);
- unless (s,^/(dev|tmp)/,,) {
- $file = -e "/dev/$file" ? "/dev/$file" : "/tmp/$file";
+ unless (s,^(.*)/(dev|tmp)/,,) {
+ $prefix = $1;
+ $file = -e "$prefix/dev/$file" ? "$prefix/dev/$file" : "$prefix/tmp/$file";
}
-e $file and return $file; # assume nobody takes fun at creating files named as device
@@ -94,7 +96,7 @@ sub make($) {
"scd0" => [ c::S_IFBLK(), 11, 0 ],
"scd1" => [ c::S_IFBLK(), 11, 1 ],
"sjcd" => [ c::S_IFBLK(), 18, 0 ],
- }}{$_} or die "unknown device $type" };
+ }}{$_} or die "unknown device $_" };
}
# make a directory for this inode if needed.