aboutsummaryrefslogtreecommitdiffstats
path: root/arch-chroot.in
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-10-23 20:26:42 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-10-23 20:26:42 -0400
commit46326677ae0f0ce2b63292cff583be70dd8e597f (patch)
tree1aea68cb9d3f8707a378bf2ead5281476459e44a /arch-chroot.in
parent55d5f6698726ab7c6f1a6f5e0ed2e282bc35e78c (diff)
parent827a047f6fe1a8eff30c6059c8822a4b65665aa9 (diff)
Update upstream source from tag 'upstream/20'
Update to upstream version '20' with Debian dir 6f59e66c4d32a587e74601361d6eb26312cd4b80
Diffstat (limited to 'arch-chroot.in')
-rw-r--r--arch-chroot.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch-chroot.in b/arch-chroot.in
index bfb83a3..fd6140e 100644
--- a/arch-chroot.in
+++ b/arch-chroot.in
@@ -13,6 +13,13 @@ usage: ${0##*/} chroot-dir [command]
If 'command' is unspecified, ${0##*/} will launch /bin/bash.
+Note that when using arch-chroot, the target chroot directory *should* be a
+mountpoint. This ensures that tools such as pacman(8) or findmnt(8) have an
+accurate hierarchy of the mounted filesystems within the chroot.
+
+If your chroot target is not a mountpoint, you can bind mount the directory on
+itself to make it a mountpoint, i.e. 'mount --bind /your/chroot /your/chroot'.
+
EOF
}
@@ -70,6 +77,10 @@ shift
[[ -d $chrootdir ]] || die "Can't create chroot on non-directory %s" "$chrootdir"
+if ! mountpoint -q "$chrootdir"; then
+ warning "$chrootdir is not a mountpoint. This may have undesirable side effects."
+fi
+
chroot_setup "$chrootdir" || die "failed to setup chroot %s" "$chrootdir"
chroot_add_resolv_conf "$chrootdir" || die "failed to setup resolv.conf"