[Pkg-samba-maint] /etc/logrotate.d/winbind misleading logrotate to report failure
lkml at think-future.de
lkml at think-future.de
Sun Feb 14 13:09:21 UTC 2010
Hi,
winbind 2:3.4.5~dfsg-1
ISSUE:
/etc/logrotate.d/winbind contains a postrotate script:
[ -f /var/run/samba/winbindd.pid ] && kill -HUP `cat /var/run/samba/winbindd.pid` 2>/dev/null
When winbind hasn't been running, there's no /var/run/samba/winbindd.pid and maybe even not a
/var/run/samba/ directory. The -f test fails and returns 1 which in turn makes logrotate
report a failure.
FIX:
As i.e. apache2 does, wrapping the test in an if-clause fixes this issue:
postrotate
if [ -f /var/run/samba/winbindd.pid ]; then
kill -HUP `cat /var/run/samba/winbindd.pid` 2>/dev/null;
fi;
endscript
Thanks,
Nils
More information about the Pkg-samba-maint
mailing list