From owner-svn-src-projects@FreeBSD.ORG Thu Nov 3 12:24:45 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F60106566C; Thu, 3 Nov 2011 12:24:45 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D838FC12; Thu, 3 Nov 2011 12:24:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA3COj3p070359; Thu, 3 Nov 2011 12:24:45 GMT (envelope-from linimon@svn.freebsd.org) Received: (from linimon@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA3COjWT070355; Thu, 3 Nov 2011 12:24:45 GMT (envelope-from linimon@svn.freebsd.org) Message-Id: <201111031224.pA3COjWT070355@svn.freebsd.org> From: Mark Linimon Date: Thu, 3 Nov 2011 12:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227057 - projects/portbuild/scripts X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2011 12:24:45 -0000 Author: linimon (doc,ports committer) Date: Thu Nov 3 12:24:44 2011 New Revision: 227057 URL: http://svn.freebsd.org/changeset/base/227057 Log: Make these scripts' error messages a bit more verbose. Modified: projects/portbuild/scripts/clean-chroot projects/portbuild/scripts/cleanup-chroots projects/portbuild/scripts/cleanup-tmp Modified: projects/portbuild/scripts/clean-chroot ============================================================================== --- projects/portbuild/scripts/clean-chroot Thu Nov 3 12:03:03 2011 (r227056) +++ projects/portbuild/scripts/clean-chroot Thu Nov 3 12:24:44 2011 (r227057) @@ -12,7 +12,7 @@ kill_procs() while [ ! -z "${pids}" ]; do pids=$(fstat -f "${dir}${mount}" | tail +2 | awk '{print $3}' | sort -u) if [ ! -z "${pids}" ]; then - echo "Killing off pids in ${dir}" + echo "clean-chroot: Killing off pids in ${dir}" ps -p $pids kill -KILL ${pids} 2> /dev/null sleep 2 @@ -27,11 +27,11 @@ cleanup_mount() { if [ -d ${chroot}${mount} ]; then mdir=$(fstat -f ${chroot}${mount} | head -2 | tail -1 | awk '{print $5}') if [ "${mdir}" = "MOUNT" ]; then - umount -f ${chroot}${mount} || echo "Cleanup of ${chroot}${mount} on $(hostname) failed!" + umount -f ${chroot}${mount} || echo "clean-chroot: Cleanup of ${chroot}${mount} on $(hostname) failed!" fi if [ "${mdir}" = "${chroot}${mount}" ]; then kill_procs ${chroot} ${mount} - umount -f ${chroot}${mount} || echo "Cleanup of ${chroot}${mount} on $(hostname) failed!" + umount -f ${chroot}${mount} || echo "clean-chroot: Cleanup of ${chroot}${mount} on $(hostname) failed!" fi fi } Modified: projects/portbuild/scripts/cleanup-chroots ============================================================================== --- projects/portbuild/scripts/cleanup-chroots Thu Nov 3 12:03:03 2011 (r227056) +++ projects/portbuild/scripts/cleanup-chroots Thu Nov 3 12:24:44 2011 (r227057) @@ -25,7 +25,7 @@ kill_procs() while [ ! -z "${pids}" ]; do pids=$(fstat -f "$dir" | tail +2 | awk '{print $3}' | sort -u) if [ ! -z "${pids}" ]; then - echo "Killing off pids in ${dir} on $(hostname)" + echo "cleanup-chroots: Killing off pids in ${dir} on $(hostname)" ps -p $pids kill -KILL ${pids} 2> /dev/null sleep 2 @@ -42,11 +42,11 @@ cleanup_mount() { if [ -d ${chroot}${mount} ]; then mdir=$(fstat -f ${chroot}${mount} | head -2 | tail -1 | awk '{print $5}') if [ "${mdir}" = "MOUNT" ]; then - umount ${chroot}${mount} || echo "Cleanup of ${chroot}${mount} on $(hostname) failed!" + umount ${chroot}${mount} || echo "cleanup-chroots: Cleanup of ${chroot}${mount} on $(hostname) failed!" fi if [ "${mdir}" = "${chroot}${mount}" ]; then kill_procs ${chroot}${mount} - umount ${chroot}${mount} || echo "Cleanup of ${chroot}${mount} on $(hostname) failed!" + umount ${chroot}${mount} || echo "cleanup-chroots: Cleanup of ${chroot}${mount} on $(hostname) failed!" fi fi } @@ -58,7 +58,7 @@ cleanup_all() { mounts=$(mount | grep ${chroot} | awk '{print $3}') if [ ! -z "${mounts}" ]; then if [ $VERBOSE ]; then - echo "trying to kill off mounts:" + echo "cleanup-chroots: trying to kill off mounts:" echo ${mounts} echo fi @@ -90,12 +90,12 @@ else fi if [ ! -z "${old_chroots}" ]; then - echo "non-empty chroots > 1 hr old found on $(hostname):" + echo "cleanup-chroots: non-empty chroots > 1 hr old found on $(hostname):" echo ${old_chroots} echo else if [ $VERBOSE ]; then - echo "no non-empty chroots > 1 hr old found on $(hostname)." + echo "cleanup-chroots: no non-empty chroots > 1 hr old found on $(hostname)." echo fi fi @@ -117,12 +117,12 @@ if [ ! -z "${old_chroots}" ]; then fi if [ ! -z "${stale_chroots}" ]; then - echo "non-empty, > 1 hr old stale chroots found on $(hostname):" + echo "cleanup-chroots: non-empty, > 1 hr old stale chroots found on $(hostname):" echo ${stale_chroots} echo else if [ $VERBOSE ]; then - echo "no non-empty, > 1 hr old stale chroots found on $(hostname)." + echo "cleanup-chroots: no non-empty, > 1 hr old stale chroots found on $(hostname)." echo fi fi @@ -162,12 +162,12 @@ for build in ${builds}; do done if [ ! -z "${stale_builds}" ]; then - echo "empty stale builds found on $(hostname):" + echo "cleanup-chroots: empty stale builds found on $(hostname):" echo ${stale_builds} echo else if [ $VERBOSE ]; then - echo "no empty stale builds found on $(hostname)." + echo "cleanup-chroots: no empty stale builds found on $(hostname)." echo fi fi @@ -178,7 +178,7 @@ if [ ! -z "${stale_builds}" ]; then # XXX MCL HACK! what I really want is "give me the next 2 subdirs after $build" mounts=$(mount | grep "${build}" | awk '{print $3}' | grep -E "/dev$") if [ $VERBOSE ]; then - echo "suspected stale mounts on $(hostname):" + echo "cleanup-chroots: suspected stale mounts on $(hostname):" echo ${mounts} echo fi Modified: projects/portbuild/scripts/cleanup-tmp ============================================================================== --- projects/portbuild/scripts/cleanup-tmp Thu Nov 3 12:03:03 2011 (r227056) +++ projects/portbuild/scripts/cleanup-tmp Thu Nov 3 12:24:44 2011 (r227057) @@ -30,37 +30,37 @@ old_script_caches=$(find /tmp/2* -type d old_setupnodes=$(find /tmp/setupnode.* -type f -prune -mmin +${REMOVE_SETUPNODE_TIME} 2> /dev/null) if [ ! -z "${old_dotsetupdirs}" ]; then - echo "non-empty stale dotsetupdirs found on $(hostname):" + echo "cleanup-tmp: non-empty stale dotsetupdirs found on $(hostname):" echo ${old_dotsetupdirs} echo rm -rf ${old_dotsetupdirs} else if [ $VERBOSE ]; then - echo "no non-empty stale dotsetupdirs found on $(hostname)." + echo "cleanup-tmp: no non-empty stale dotsetupdirs found on $(hostname)." echo fi fi if [ ! -z "${old_script_caches}" ]; then - echo "non-empty stale script_caches found on $(hostname):" + echo "cleanup-tmp: non-empty stale script_caches found on $(hostname):" echo ${old_script_caches} echo rm -rf ${old_script_caches} else if [ $VERBOSE ]; then - echo "no non-empty stale script_caches found on $(hostname)." + echo "cleanup-tmp: no non-empty stale script_caches found on $(hostname)." echo fi fi if [ ! -z "${old_setupnodes}" ]; then - echo "non-empty stale setupnodes found on $(hostname):" + echo "cleanup-tmp: non-empty stale setupnodes found on $(hostname):" echo ${old_setupnodes} echo rm -rf ${old_setupnodes} else if [ $VERBOSE ]; then - echo "no non-empty stale setupnodes found on $(hostname)." + echo "cleanup-tmp: no non-empty stale setupnodes found on $(hostname)." echo fi fi