[php-maint] php5 cron script failure

Benjamin Baier programmer at netzbasis.de
Wed Nov 19 11:25:54 UTC 2014


Hello, seeing this failure on Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux

Cron <root at xxx> [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)
sed: invalid option -- 'z'

Patch included for /usr/lib/php/sessionclean
--- sessionclean.old	2014-11-19 11:55:50.367402673 +0100
+++ sessionclean	2014-11-19 11:56:12.391731324 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # first find all used files and touch them (hope it's not massive amount of files)
-[ -x /usr/bin/lsof ] && /usr/bin/lsof -w -l +d "${1}" -F0 | sed -zne "s/^n//p" | xargs -0i echo touch -c -h "'{}'"
+[ -x /usr/bin/lsof ] && /usr/bin/lsof -w -l +d "${1}" -F0 | sed -ne "s/^n//p" | xargs -0i echo touch -c -h "'{}'"
 
 # find all files older then maxlifetime
 find "${1}" -depth -mindepth 1 -maxdepth 1 -ignore_readdir_race -type f -cmin "+${2}" -delete



More information about the pkg-php-maint mailing list