[Pkg-samba-maint] Bug#569926: winbind: /etc/logrotate.d/winbind misleading logrotate to report failure
Christian PERRIER
bubulle at debian.org
Mon Feb 15 06:36:36 UTC 2010
Package: winbind
Severity: normal
Original reporter (but that address bounces):
lkml at think-future.de. First name "Nils".
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
_______________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20100215/7f91f2e7/attachment.pgp>
More information about the Pkg-samba-maint
mailing list