X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=14b691b10a2194b1747927501fd4a406d1797b0c;hb=721245159cf89bc1fa00c74f309f843419ffbdf7;hp=ac5a11d90016431f1bd2f5ff91ebd557a2269b2b;hpb=46a2975cbe89c79fad334a1cef7d03623eacca84;p=php5-cn.git diff --git a/debian/postinst b/debian/postinst index ac5a11d..14b691b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -137,7 +137,9 @@ for php5ext in $EXTENSIONS; do if [ -f "$ini_file" ]; then - cp_echo "CN: Removing $php5ext extension from file $ini_file" + if egrep -q "$php5ext_re" "$ini_file"; then + cp_echo "CN: Removing $php5ext extension from file $ini_file" + fi cp_check_and_sed "$php5ext_re" \ "/$php5ext_re/d" \ @@ -256,10 +258,7 @@ done # Compare active PHP5 extensions with PHP4 ones, if PHP4 configuration still exists. # -db_fget php5-cn/extensions seen -if [ "$RET" != "true" ]; then - - if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then +if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then phpext_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*["]{0,1}(.*)\.so["]{0,1}' @@ -288,11 +287,11 @@ if [ "$RET" != "true" ]; then if [ -n "$php5_ext_mis" ]; then db_fset php5-cn/extensions seen false db_title php5-cn - konfiguracija - db_subst php5-cn/extensions php5_extensions "${php5_ext_mis}" + db_capb escape + db_subst php5-cn/extensions php5_extensions "${php5_ext_mis#*\n}" db_input critical php5-cn/extensions || true db_go || true fi - fi fi @@ -309,9 +308,9 @@ if [ $need_restart -eq 1 ]; then # Restart Apache2 web server. if [ -x "/etc/init.d/apache2" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d apache2 force-reload || true + invoke-rc.d apache2 restart || true else - /etc/init.d/apache2 force-reload || true + /etc/init.d/apache2 restart || true fi fi else