Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 2d4ca37d3d66229cfbb5439dff37b8ce > scriptlet

php-dba_gdbm_db3-4.1.2-1mdk.ppc.rpm

PREUN

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

POSTIN

/bin/sh
#The package name has changed, so make sure we change php.ini even at
#install.
perl -pi -e 's|gdbm_db2|gdbm_db3|g' /etc/php.ini
if [ $1 = "1" ]; then
  if [ -f /etc/php.ini ]; then
    perl -pi -e 's|^;extension\s*=\s*dba_gdbm_db3.so|extension = dba_gdbm_db3.so|' /etc/php.ini
  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.
   perl -pi -e 's|^extension\s*=\s*dba_gdbm_db3.so|;extension = dba_gdbm_db3.so|g' /etc/php.ini
   perl -pi -e 's|^;extension\s*=\s*dba_gdbm_db3.so|extension = dba_gdbm_db3.so|' /etc/php.ini
fi
if [ -e /usr/sbin/AESctl ]; then /usr/sbin/AESctl reload;fi