]> git.pld-linux.org Git - packages/php-dirs.git/commitdiff
- exit after fist match
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 18 Aug 2009 06:31:49 +0000 (06:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-session.sh -> 1.3

php-session.sh

index 93cfc510bcefc70388c947a07b55a6635073036f..c27aae781b4ee714e114a57275e9a7afb6176097 100644 (file)
@@ -2,13 +2,13 @@
 if [ -x /usr/bin/php.cli ] ; then
        RUNTIME5=$(/usr/bin/php.cli -r '$t = round(ini_get("session.gc_maxlifetime")/3600); if ($t<1) $t=1; echo $t;' 2> /dev/null)
 elif [ -r /etc/php/php.ini ]; then
-       RUNTIME5=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t;}' /etc/php/php.ini)
+       RUNTIME5=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t; exit;}' /etc/php/php.ini)
 fi
 
 if [ -x /usr/bin/php4.cli ] ; then
        RUNTIME4=$(/usr/bin/php4.cli -r '$t = round(ini_get("session.gc_maxlifetime")/3600); if ($t<1) $t=1; echo $t;' 2> /dev/null)
 elif [ -r /etc/php4/php.ini ]; then
-       RUNTIME4=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t;}' /etc/php4/php.ini)
+       RUNTIME4=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t; exit;}' /etc/php4/php.ini)
 fi
 
 [ -z "$RUNTIME5" ] && RUNTIME5="1h"
This page took 0.091993 seconds and 4 git commands to generate.