mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-26 09:57:26 +03:00
namespace: unmount old /dev under our new private /dev (#3254)
Drop all dangling old /dev mounts before mounting a new private /dev tree.
This commit is contained in:
parent
2099b3e993
commit
9e5f825280
@ -237,6 +237,8 @@ static int mount_dev(BindMount *m) {
|
||||
*/
|
||||
(void) mkdir_p_label(m->path, 0755);
|
||||
|
||||
/* Unmount everything in old /dev */
|
||||
umount_recursive(m->path, 0);
|
||||
if (mount(dev, m->path, NULL, MS_MOVE, NULL) < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user