diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | arch-chroot.in | 11 | ||||
| -rw-r--r-- | common | 5 | ||||
| -rw-r--r-- | genfstab.in | 3 | ||||
| -rw-r--r-- | pacstrap.in | 2 |
5 files changed, 19 insertions, 4 deletions
@@ -1,4 +1,4 @@ -VER=19 +VER=20 PREFIX = /usr/local 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" @@ -46,6 +46,7 @@ declare -A fsck_types=([cramfs]=1 out() { printf "$1 $2\n" "${@:3}"; } error() { out "==> ERROR:" "$@"; } >&2 +warning() { out "==> WARNING:" "$@"; } >&2 msg() { out "==>" "$@"; } msg2() { out " ->" "$@";} die() { error "$@"; exit 1; } @@ -91,7 +92,9 @@ chroot_setup() { } chroot_teardown() { - umount "${CHROOT_ACTIVE_MOUNTS[@]}" + if (( ${#CHROOT_ACTIVE_MOUNTS[@]} )); then + umount "${CHROOT_ACTIVE_MOUNTS[@]}" + fi unset CHROOT_ACTIVE_MOUNTS } diff --git a/genfstab.in b/genfstab.in index 7663522..0ebb831 100644 --- a/genfstab.in +++ b/genfstab.in @@ -83,7 +83,8 @@ usage: ${0##*/} [options] root -L Use labels for source identifiers (shortcut for -t LABEL) -p Exclude pseudofs mounts (default behavior) -P Include pseudofs mounts - -t TAG Use TAG for source identifiers + -t TAG Use TAG for source identifiers (TAG should be one of: LABEL, + UUID, PARTLABEL, PARTUUID) -U Use UUIDs for source identifiers (shortcut for -t UUID) -h Print this help message diff --git a/pacstrap.in b/pacstrap.in index 72f2809..0c34df4 100644 --- a/pacstrap.in +++ b/pacstrap.in @@ -24,7 +24,7 @@ usage: ${0##*/} [options] root [packages...] -C config Use an alternate config file for pacman -c Use the package cache on the host, rather than the target -G Avoid copying the host's pacman keyring to the target - -i Avoid auto-confirmation of package selections + -i Prompt for package confirmation when needed -M Avoid copying the host's mirrorlist to the target -h Print this help message |
