From 57125e9197e0d3741c6c43dd5e9dded5e91a9823 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 16 Oct 2010 22:35:36 -0500 Subject: [PATCH] script/makepkg: rename chroot functions to better match intent --- script/makepkg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/script/makepkg b/script/makepkg index e5abcb3..64318df 100755 --- a/script/makepkg +++ b/script/makepkg @@ -21,8 +21,8 @@ leaf_ports() { # ######## -# Setup a chroot -chsetup() { +# Set up chroot mounts and runtime configuration +chstartup() { # Necessary mountpoints mkdir -p "${chroot_dir}/dev" || return 1 mount -t devfs devfs "${chroot_dir}/dev" || return 1 @@ -39,11 +39,14 @@ chsetup() { mkdir -p "${bdeps_dir}" || return 1 } -# Tear down a chroot -chteardown() { +# Unmount all chroot directories +chshutdown() { + # Short-circuit if nothing is mounted + mount | grep -q "${chroot_dir}" || return 0 umount "${chroot_dir}/var/ports/distfiles" umount "${chroot_dir}/usr/ports" umount "${chroot_dir}/dev" + return 0 } # Evaluate a command line within the chroot -- 2.42.0