From b0e59f61c09af6633096594414763db5978a6e7c Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Tue, 12 Oct 2010 20:09:20 +1300 Subject: [PATCH] Bug 5510: prepend output with system name --- debian/scripts/koha-foreach | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/debian/scripts/koha-foreach b/debian/scripts/koha-foreach index 80152bc..b1bcc15 100755 --- a/debian/scripts/koha-foreach +++ b/debian/scripts/koha-foreach @@ -29,9 +29,14 @@ fi for name in $(koha-list $listopts) do + ( + exec 3>&1 sudo -u "$name-koha" \ env PERL5LIB=/usr/share/koha/lib \ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ - "$@" + "$@" 2>&1 >&3 | sed -e "s/^/$name: /" >&2 3>&- + exec 3>&- + ) | sed -e "s/^/$name: /" + done -- 1.7.1