Public bug reported: Bug number 1030519 tracks this issue in perl and Bug number 1007089 is the root cause. In Ubuntu perl is located in /usr/bin/perl, so using $^X isn't necessarily needed. Also you should investigate using eval() or other methods to get a sub-perl instance.
One solution may be to copy stdin to another handle and then close stdin and open STDIN $(cat ... |). A pipepare can be used to get an actual system filedescriptor. Then the perl code can be run in an eval, instead of a system. I would be willing to help with development. /etc/cron.daily/00logwatch: sh: 1: /bin/perl: not found sh: 1: /bin/perl: not found system 'cat '/var/log/mail.log' '/var/log/mail.log.1' | /bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/tmp/logwatch.BMbdlb_J/maillog' failed: 32512 at /usr/sbin/logwatch line 871. run-parts: /etc/cron.daily/00logwatch exited with return code 2 ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: logwatch 7.4.0+svn20111221rev79-1ubuntu1 ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14 Uname: Linux 3.2.0-23-lowlatency-pae i686 ApportVersion: 2.0.1-0ubuntu8 Architecture: i386 Date: Sun Jul 29 09:12:38 2012 PackageArchitecture: all SourcePackage: logwatch UpgradeStatus: Upgraded to precise on 2012-01-03 (208 days ago) ** Affects: logwatch (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug i386 precise -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to logwatch in Ubuntu. https://bugs.launchpad.net/bugs/1030520 Title: logwatch: Makes use of $^X, broken under overlayfs. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1030520/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs