diff options
Diffstat (limited to 'debian/local/update_ldap.in')
-rw-r--r-- | debian/local/update_ldap.in | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/debian/local/update_ldap.in b/debian/local/update_ldap.in index 5daca95..bd20293 100644 --- a/debian/local/update_ldap.in +++ b/debian/local/update_ldap.in @@ -27,6 +27,27 @@ SCHEMA_PATH=; SCHEMA_NAME=; LDAP_VERSION=; +# Path to other sendmail helpers +if [ -x ./update_sendmail ]; then + sm_path='.'; +elif [ -x $(dirname $0)/update_sendmail ]; then + sm_path=$(dirname $0); +else + sm_path=@datadir@/sendmail; + fi; +# Bring in sendmail.conf for the network definitions +if [ ! -f @sysconfdir@/mail/sendmail.conf ]; then + if [ -x $sm_path/update_conf ]; then + $sm_path/update_conf; + fi; + fi; +if [ -f @sysconfdir@/mail/sendmail.conf ]; then + . @sysconfdir@/mail/sendmail.conf; + fi; +if [ "$HANDS_OFF" != 'No' ]; then + exit 0; + fi; + install_schema () { # # Install sendmail.schema in the appropriate place @@ -86,7 +107,7 @@ else echo "$SCHEMA_PATH/sendmail.schema has been installed"; fi; -if [ $FOUND -eq 0 -a $NEW -eq 1 ]; then +if [ $FOUND -eq 0 ] && [ $NEW -eq 1 ]; then cat <<-EOT No local LDAP server was located (tried openldap v2/v1, umich-ldap). @@ -104,7 +125,7 @@ if [ $FOUND -eq 0 -a $NEW -eq 1 ]; then If you later install a local LDAP server, be sure to re-run $0. EOT -elif [ $FOUND -eq 1 -a $NEW -eq 1 ]; then +elif [ $FOUND -eq 1 ] && [ $NEW -eq 1 ]; then cat <<-EOT You have a local $LDAP_VERSION server! Depending upon how (and if) |