From ccdf49c65959f03fbea0e4676478c50094c68aa7 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 6 Sep 2012 15:36:16 +0200 Subject: [PATCH] [bin] improve wording of buildrc error messages --- bin/buildrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/buildrc b/bin/buildrc index 2dedc9e..a88bb08 100644 --- a/bin/buildrc +++ b/bin/buildrc @@ -3,12 +3,17 @@ emerge() { snapshot_lock_file="/var/tmp/.emerge.snapshot.lock" matter_lock_file="/var/tmp/.matter_resource.lock" + flock -x -n "${matter_lock_file}" true rc=${?} if [ "${rc}" != "0" ]; then echo >&2 echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >&2 - echo "matter is running on this chroot, in order to prevent explosions" >&2 + echo "Matter or the Backup Script is running on this chroot" >&2 + echo "Please be patient, it will eventually terminate..." >&2 + echo "Snapshot lock file = ${snapshot_lock_file}" >&2 + echo "Matter lock file = ${matter_lock_file}" >&2 + echo >&2 echo "this emerge instance will terminate NOW" >&2 echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >&2 echo >&2