mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
[PATCH] make udev-test.pl test for root permissions before running
Should prevent false error reports from happening.
This commit is contained in:
@@ -1275,6 +1275,13 @@ sub run_test {
|
||||
|
||||
}
|
||||
|
||||
# only run if we have root permissions
|
||||
# due to mknod restrictions
|
||||
if (!($<==0)) {
|
||||
print "Must have root permissions to run properly.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
# prepare
|
||||
system("rm -rf $udev_root");
|
||||
mkdir($udev_root) || die "unable to create udev_root: $udev_root\n";
|
||||
|
||||
Reference in New Issue
Block a user