Package: libpam-ldap
Version: 180-1.1
Severity: normal

In two of the postinst's functions, I changed:

in mine, starts on line 38, might be a bit off because I added a 'set -x' at 
the top, and removed some blank lines.

(fake diffs)

in function change_value():

        # i really need a better way to do this...
        # currently we replace only the first match, we need a better
        # way of dealing with multiple hits.
-       perl -i -p -e "s/$replacestring/$parameter $value/i
+       perl -i -p -e "s|$replacestring|$parameter $value|i
            and \$match=1 if (\$match != 1)" $CONFFILE
    fi
}

and in function disable_param():

    enabled=0
    egrep -q "^$parameter " $CONFFILE && enabled=1
    if [ "$enabled" = "1" ]; then
-       perl -i -p -e "s/^($parameter .*)/#\$1/i" $CONFFILE
+       perl -i -p -e "s|^($parameter .*)|#\$1|i" $CONFFILE
    fi
}

This was done because they might falsely match on '://' and 'dc=foo,dc=bar', 
which resulted in the following install error:

Setting up libpam-ldap (180-1.1) ...
Bareword found where operator expected at -e line 1, near "//iskwahtemis"
        (Missing operator before kwahtemis?)
syntax error at -e line 1, near "ldaps:"
Search pattern not terminated at -e line 1.
dpkg: error processing libpam-ldap (--configure):
 subprocess post-installation script returned error exit status 255


Thanks, it works otherwise :).

simon

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (1000, 'unstable'), (998, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17.4
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)

Versions of packages libpam-ldap depends on:
ii  debconf [debconf-2.0]       1.5.3        Debian configuration management sy
ii  libc6                       2.3.6.ds1-4  GNU C Library: Shared libraries
ii  libldap2                    2.1.30-13+b1 OpenLDAP libraries
ii  libpam0g                    0.79-3.2     Pluggable Authentication Modules l

libpam-ldap recommends no packages.

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to