mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Print debug message if a namespace test fails
This commit is contained in:
parent
c5c0617d6f
commit
0a70b411e1
1 changed files with 12 additions and 2 deletions
|
@ -39,7 +39,12 @@ bool userNamespacesSupported()
|
|||
_exit(res ? 1 : 0);
|
||||
});
|
||||
|
||||
return pid.wait() == 0;
|
||||
bool supported = pid.wait() == 0;
|
||||
|
||||
if (!supported)
|
||||
debug("user namespaces do not work on this system");
|
||||
|
||||
return supported;
|
||||
}();
|
||||
return res;
|
||||
}
|
||||
|
@ -56,7 +61,12 @@ bool mountNamespacesSupported()
|
|||
_exit(res ? 1 : 0);
|
||||
});
|
||||
|
||||
return pid.wait() == 0;
|
||||
bool supported = pid.wait() == 0;
|
||||
|
||||
if (!supported)
|
||||
debug("mount namespaces do not work on this system");
|
||||
|
||||
return supported;
|
||||
}();
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue