Comment 20 for bug 1880211

Revision history for this message
rich painter (painterengr) wrote :

I'm running Ubuntu 16.04.7 LTS 64bit and Logwatch 7.4.2.
My root user has /sbin in the path and when I run zpool I don't have to prefix it with the path.

Still to make this logwatch section work, I had previously edited my /usr/share/logwatch/scripts/services/zz-zfs on lines 54 and 55 to have the a different path "/sbin/zpool" and "/sbin/zfs" some time back.

However recently logwatch stopped reporting the ZFS section. For some strange reason file zz-zfs lines 54 and 55 now say:
my $pathto_zpool = $ENV{'pathto_zpool'} || 'zpool';
my $pathto_zfs = $ENV{'pathto_zfs'} || 'zfs';

And $pathto_zpool gets set to zpool. But the test on line 59 takes the "exit 0". This test for existence requires a path!!! So whoever changed this did this wrong!

I AGAIN have changed these lines to:
my $pathto_zpool = $ENV{'pathto_zpool'} || '/sbin/zpool';
my $pathto_zfs = $ENV{'pathto_zfs'} || '/sbin/zfs';

and all is working!