From 5117ff84a2660bdc43036b59b463571604e63a05 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 30 Apr 2016 17:34:32 +0200 Subject: [PATCH] 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(). --- bin/xbps-uchroot/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/xbps-uchroot/main.c b/bin/xbps-uchroot/main.c index 92d948d2..1c5a3a78 100644 --- a/bin/xbps-uchroot/main.c +++ b/bin/xbps-uchroot/main.c @@ -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);