xbps-uchroot: do not fail if the mount MS_MOVE operation fails.
This could happen if chrootdir is in a shared mount or when it's not a real mountpoint. Just continue with chroot().
This commit is contained in:
parent
7c8b1d7aaa
commit
5117ff84a2
@ -408,8 +408,7 @@ main(int argc, char **argv)
|
||||
if (mount(".", ".", NULL, MS_BIND|MS_PRIVATE, NULL) == -1)
|
||||
die("Failed to bind mount %s", chrootdir);
|
||||
|
||||
if (mount(chrootdir, "/", NULL, MS_MOVE, NULL) == -1)
|
||||
die("Failed to move %s as rootfs", chrootdir);
|
||||
mount(chrootdir, "/", NULL, MS_MOVE, NULL);
|
||||
|
||||
if (chroot(".") == -1)
|
||||
die("Failed to chroot to %s", chrootdir);
|
||||
|
Loading…
Reference in New Issue
Block a user