diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 4 | ||||
-rw-r--r-- | perl-install/devices.pm | 5 |
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; |