Package: fai-client
Version: 3.1.6
Severity: important
Tags: patch
if $debug is set, shell.log is overwritten every time ifclass is called
in $FAI/scripts. problem: stderr is redirected (in append mode) to a
file, but ifclass redirects its debug messages (in overwrite mode) to
stderr.
the attached patch solves this problem for me.
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Versions of packages fai-client depends on:
ii cfengine2 2.1.20-1 Tool for configuring and maintaini
ii file 4.19-1 Determines file type using "magic"
ii libapt-pkg-perl 0.1.20 Perl interface to libapt-pkg
ii perl 5.8.8-7 Larry Wall's Practical Extraction
fai-client recommends no packages.
-- no debconf information
Index: subroutines
===================================================================
--- subroutines (revision 4227)
+++ subroutines (working copy)
@@ -61,7 +61,7 @@
ifclass() {
- [ "$debug" ] && echo "Test if class $1 is in $classes" >/dev/stderr
+ [ "$debug" ] && echo "Test if class $1 is in $classes" >>/dev/stderr
# test if a class is defined
local cl
local ret=1
@@ -69,7 +69,7 @@
for cl in $classes; do
[ x$cl = x$1 ] && ret=0 && break
done
- [ "$debug" ] && echo "ifclass returns $ret" >/dev/stderr
+ [ "$debug" ] && echo "ifclass returns $ret" >>/dev/stderr
return $ret
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -