From 8501e9879b9974c156d888c94488b52542924b45 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 16 Oct 2010 23:18:51 -0500 Subject: [PATCH] script/makepkg: verbosity in chstartup, chshutdown, chdestroy --- script/makepkg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/script/makepkg b/script/makepkg index 53ee923..082dcbb 100755 --- a/script/makepkg +++ b/script/makepkg @@ -52,6 +52,7 @@ chprepare() { trap "" exit hup int term kill meh "Chroot tree set up in ${chroot_dir}" + return 0 } @@ -59,6 +60,8 @@ chprepare() { chstartup() { [ -d "${chroot_dir}" -a -a -f "${chroot_dir}/COPYRIGHT" -a -d "${chroot_dir}/dev" ] || wtf "Chroot not prepared" + meh "Starting up chroot" + # Necessary mountpoints mount -t devfs devfs "${chroot_dir}/dev" || wtf "mount /dev failed" mount -t nullfs -r /usr/src "${chroot_dir}/usr/src" || wtf "mount /usr/src failed" @@ -67,6 +70,9 @@ chstartup() { # Chroot configuration cp -f /etc/resolv.conf "${chroot_dir}/etc/resolv.conf" || wtf "seeding /etc/resolv.conf failed" + + meh "Chroot up and running in ${chroot_dir}" + return 0 } @@ -74,6 +80,7 @@ chstartup() { chshutdown() { # Short-circuit if nothing is mounted mount | grep -q "${chroot_dir}" || return 0 + meh "Shutting down chroot" umount "${chroot_dir}/var/ports/distfiles" umount "${chroot_dir}/usr/ports" umount "${chroot_dir}/dev" @@ -83,6 +90,7 @@ chshutdown() { # Remove all chroot contents chdestroy() { chshutdown + meh "Destroying chroot" chflags -R noschg "${chroot_dir}" || wtf "noschg failed" rm -Rf "${chroot_dir}" || wtf "chroot removal failed" return 0 -- 2.42.0