[Koha-patches] [PATCH] Bug 5510: prepend output with system name
Robin Sheat
robin at catalyst.net.nz
Thu Dec 16 07:23:31 CET 2010
From: Srdjan Jankovic <srdjan at catalyst.net.nz>
---
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
More information about the Koha-patches
mailing list