X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=php5-cn.git;a=blobdiff_plain;f=debian%2Fconfig;h=51ba28c54c1bcb55eb58fd9d0a91ff3e4a9d0919;hp=6fb49e5ede5cff00614a752aef55ff2d97accbb0;hb=bd7b89019cd11f2ff6d8a119e412ccfa6304a20f;hpb=000364ef2f3957ca12be3036e3ac87246b1ca7ad diff --git a/debian/config b/debian/config index 6fb49e5..51ba28c 100755 --- a/debian/config +++ b/debian/config @@ -10,11 +10,11 @@ if [ "$1" != reconfigure ]; then php5_done=1 for SAPI in apache2 cli; do - db_fget php5-cn/${SAPI} seen - if [ "$RET" != "true" ]; then - php5_done=0 - break - fi + db_fget php5-cn/${SAPI} seen + if [ "$RET" != "true" ]; then + php5_done=0 + break + fi done test $php5_done -eq 1 && exit 0 @@ -49,51 +49,51 @@ for SAPI in apache2 cli; do upload_max_filesize= post_max_size= memory_limit= - + phplimit="$(phpmemlimit)M" if [ -f "$ini_file" ]; then if egrep -q "^[[:space:]]*(upload_max_filesize|post_max_size|memory_limit)[[:space:]]*=" $ini_file; then - upload_max_filesize=`awk '$1 == "upload_max_filesize" { print $3; exit(0) }' $ini_file` - post_max_size=`awk '$1 == "post_max_size" { print $3; exit(0) }' $ini_file` - memory_limit=`awk '$1 == "memory_limit" { print $3; exit(0) }' $ini_file` - - if [ "$upload_max_filesize" != "256M" ]; then ini_diff=1; fi - if [ "$post_max_size" != "$phplimit" ]; then ini_diff=1; fi - if [ "$memory_limit" != "$phplimit" ]; then ini_diff=1; fi - else - - ini_diff=1 - fi + upload_max_filesize=`awk '$1 == "upload_max_filesize" { print $3; exit(0) }' $ini_file` + post_max_size=`awk '$1 == "post_max_size" { print $3; exit(0) }' $ini_file` + memory_limit=`awk '$1 == "memory_limit" { print $3; exit(0) }' $ini_file` + + if [ "$upload_max_filesize" != "256M" ]; then ini_diff=1; fi + if [ "$post_max_size" != "$phplimit" ]; then ini_diff=1; fi + if [ "$memory_limit" != "$phplimit" ]; then ini_diff=1; fi + else + + ini_diff=1 + fi else - - ini_diff=1 + + ini_diff=1 fi - + if [ $ini_diff -eq 1 ]; then - # Configurations are not the same - ask user what to do. - test -z "$upload_max_filesize" && upload_max_filesize="2M" - test -z "$post_max_size" && post_max_size="8M" - test -z "$memory_limit" && memory_limit="16M" - - db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/') - db_subst php5-cn/${SAPI} ini_file "$ini_file" - - db_subst php5-cn/${SAPI} upload_max_filesize "$upload_max_filesize" - db_subst php5-cn/${SAPI} post_max_size "$post_max_size" - db_subst php5-cn/${SAPI} memory_limit "$memory_limit" - - db_subst php5-cn/${SAPI} new_phplimit "$phplimit" - - db_input critical php5-cn/${SAPI} || true - db_go || true + # Configurations are not the same - ask user what to do. + test -z "$upload_max_filesize" && upload_max_filesize="2M" + test -z "$post_max_size" && post_max_size="8M" + test -z "$memory_limit" && memory_limit="16M" + + db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/') + db_subst php5-cn/${SAPI} ini_file "$ini_file" + + db_subst php5-cn/${SAPI} upload_max_filesize "$upload_max_filesize" + db_subst php5-cn/${SAPI} post_max_size "$post_max_size" + db_subst php5-cn/${SAPI} memory_limit "$memory_limit" + + db_subst php5-cn/${SAPI} new_phplimit "$phplimit" + + db_input critical php5-cn/${SAPI} || true + db_go || true else - - db_set php5-cn/${SAPI} false || true - db_fset php5-cn/${SAPI} seen true + + db_set php5-cn/${SAPI} false || true + db_fset php5-cn/${SAPI} seen true fi done