summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-23 11:38:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-23 11:38:49 +0000
commit3034cf642a22b57c653f936ad3868c3da65fea2f (patch)
treecebe5a49bd6bbb9b7cee90b3b7b6766e6eedd2d7 /perl-install
parenta10767a3517dcba47a63f15c762852291fecbc6e (diff)
downloaddrakx-3034cf642a22b57c653f936ad3868c3da65fea2f.tar
drakx-3034cf642a22b57c653f936ad3868c3da65fea2f.tar.gz
drakx-3034cf642a22b57c653f936ad3868c3da65fea2f.tar.bz2
drakx-3034cf642a22b57c653f936ad3868c3da65fea2f.tar.xz
drakx-3034cf642a22b57c653f936ad3868c3da65fea2f.zip
devices::make doesn't mknod with devfs
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm4
-rw-r--r--perl-install/devices.pm5
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 0ea650e1f..f324bca8c 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -354,12 +354,12 @@ sub check {
sub tryOpen($) {
local *F;
- sysopen F, devices::make($_[0]), c::O_NONBLOCK() and *F;
+ eval { sysopen F, devices::make($_[0]), c::O_NONBLOCK() and *F };
}
sub tryWrite($) {
local *F;
- sysopen F, devices::make($_[0]), 1 | c::O_NONBLOCK() and *F;
+ eval { sysopen F, devices::make($_[0]), 1 | c::O_NONBLOCK() and *F };
}
sub syslog {
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index d8b561310..0423e5813 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -168,6 +168,11 @@ sub make($) {
my ($type, $major, $minor) = eval { entry($_) };
$@ and die "unknown device $_ (caller is " . join(":", caller()) . ")";
+ if ($file =~ m|/dev/| && -e '/dev/.devfsd') {
+ #- argh, creating devices is no good with devfs...
+ die "devices are handled by devfsd, and $file doesn't exist";
+ }
+
#- make a directory for this inode if needed.
mkdir dirname($file), 0755;