[bin] improve wording of buildrc error messages

This commit is contained in:
Fabio Erculiani 2012-09-06 15:36:16 +02:00
parent 538b184744
commit ccdf49c659
1 changed files with 6 additions and 1 deletions

View File

@ -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