summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 4d1d9745e..6b091be27 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -185,7 +185,9 @@ sub make($) {
#- make a directory for this inode if needed.
mkdir_p(dirname($file));
- syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!";
+ syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or do {
+ die "mknod failed (dev $_): $!" if ! -e $file; # we may have raced with udev
+ };
$file;
}