Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > media > contrib > by-pkgid > d1178e76e6e62c95aa971a8075fd9867 > scriptlet

mod_auth_ldap-1.6.0-14mdk.i586.rpm

POSTIN

/bin/sh
if [ $1 = "1" ]; then
   #We're in Install mode, add module to the config files
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
        /usr/sbin/advxaddmod $config \
         extramodules/auth_ldap.so auth_ldap.c auth_ldap_module \
         define=HAVE_AUTH_LDAP
     fi
   done
   if [ -e /usr/sbin/ADVXctl ]; then /usr/sbin/ADVXctl update;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), and finally clean the module
   #specific config file so it's compatible with the upgrade.
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
        /usr/sbin/advxdelmod $config \
         extramodules/auth_ldap.so auth_ldap.c auth_ldap_module \
         define=HAVE_AUTH_LDAP
     fi
     if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
        /usr/sbin/advxaddmod $config \
         extramodules/auth_ldap.so auth_ldap.c auth_ldap_module \
         define=HAVE_AUTH_LDAP
     fi
   done
   if [ -e /usr/sbin/ADVXctl ]; then /usr/sbin/ADVXctl update;fi
fi

POSTUN

/bin/sh
if [ $1 = "0" ]; then
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
        /usr/sbin/advxdelmod $config \
         extramodules/auth_ldap.so auth_ldap.c auth_ldap_module \
         define=HAVE_AUTH_LDAP
     fi
   done
   if [ -e /usr/sbin/ADVXctl ]; then /usr/sbin/ADVXctl update;fi
fi