Sophie

Sophie

distrib > Mandriva > 9.0 > x86_64 > by-pkgid > 691ff80da25a4dd8f00fdc859a54428d > scriptlet

php-xslt-4.2.3-1mdk.x86_64.rpm

PREUN

/bin/sh
alias FIXME="perl -pi -e"
if [ $1 = "0" ]; then
  if [ -f /etc/php.ini ]; then
    FIXME 's|^extension\s*=\s*xslt.so|;extension = xslt.so|g' /etc/php.ini
  fi
fi

POSTIN

/bin/sh
alias FIXME="perl -pi -e"
if [ $1 = "1" ]; then
  if [ -f /etc/php.ini ]; then
    FIXME 's|^;extension\s*=\s*xslt.so|extension = xslt.so|' /etc/php.ini
    LINE=`grep xslt\.so /etc/php.ini |grep extension`
    if [ "x$LINE" = "x" ]; then
      echo extension = xslt.so >> /etc/php.ini
    fi
  fi
fi
if [ $1 -gt 1 ]; then
   #We're in *upgrade mode*. Since we can't be sure the configuration files
   #are sane, remove module from the conf files to clean them, re-add again
   #in a way that the older module we're replacing won't try to erase (the
   #post scripts were broken on some packages)
   #Also, there could be extra lines, so make sure we uncomment one
   #Finally, don't check for presence of php.ini, if it's not there,
   #we have a problem, so it should generate an error message.
   FIXME 's|^extension\s*=\s*xslt.so|;extension = xslt.so|g' /etc/php.ini
   FIXME 's|^;extension\s*=\s*xslt.so|extension = xslt.so|' /etc/php.ini
fi