diff options
Diffstat (limited to 'rescue/devices.pl')
-rw-r--r-- | rescue/devices.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rescue/devices.pl b/rescue/devices.pl index 79308508a..0d4a8f77f 100644 --- a/rescue/devices.pl +++ b/rescue/devices.pl @@ -2,8 +2,6 @@ @ARGV == 1 && chdir $ARGV[0] or die "usage: devices.pl <dir>\n"; -if ($>) { $sudo = "sudo"; $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; } - foreach (<DATA>) { chomp; my ($typ, $maj, $min, @l) = split; @@ -15,7 +13,10 @@ foreach (<DATA>) { $_; } }; - system("$sudo mknod $_ $typ $maj " . $min++) foreach @l2; + foreach (@l2) { + my $cmd = "mknod-m600 $_ $typ $maj " . $min++; + system($cmd) == 0 or die "$cmd failed\n"; + } } } |