net/openldap2[4-6]-server: suppress warning message when chown failed.

On UFS with sujournal enabled, the journal is immutable and chown would
fail. This would cause the script to issue an error when a separate UFS
file system is used as OpenLDAP data store, which is not actionable and
causes confusion.

Reported by:	Olivier Nicole <on cs.ait.ac.th>
PR:		ports/266811
This commit is contained in:
Xin LI 2022-10-21 10:39:00 -07:00
parent 1426d4738c
commit 682ba7c849
6 changed files with 9 additions and 9 deletions

View file

@ -52,7 +52,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}
.endif
PORTREVISION_CLIENT= 4
PORTREVISION_SERVER= 10
PORTREVISION_SERVER= 11
OPENLDAP_SHLIB_MAJOR= 2
OPENLDAP_SHLIB_MINOR= 11.7
OPENLDAP_MAJOR= ${DISTVERSION:R}

View file

@ -99,13 +99,13 @@ start_precmd()
mkdir -p "${DBDIR}"
[ -f "%%PREFIX%%/etc/openldap/DB_CONFIG.example" ] && cp "%%PREFIX%%/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
fi
chown -RL "$slapd_owner" "${DBDIR}"
chown -fRL "$slapd_owner" "${DBDIR}"
chmod 700 "${DBDIR}"
done
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
if checkyesno slapd_cn_config; then
chown -R $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
chown -fR $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
else
chown $slapd_owner "%%PREFIX%%/etc/openldap/slapd.conf"
fi

View file

@ -45,7 +45,7 @@ CONFLICTS_INSTALL= ${PORTNAME}2[0-46-9]-server ${PORTNAME}-server
GNU_CONFIGURE= yes
PORTREVISION_CLIENT= 0
PORTREVISION_SERVER= 1
PORTREVISION_SERVER= 2
OPENLDAP_SHLIB_MAJOR= 0
OPENLDAP_SHLIB_MINOR= 1.8
OPENLDAP_MAJOR= ${DISTVERSION:R}

View file

@ -99,13 +99,13 @@ start_precmd()
mkdir -p "${DBDIR}"
[ -f "%%PREFIX%%/etc/openldap/DB_CONFIG.example" ] && cp "%%PREFIX%%/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
fi
chown -RL "$slapd_owner" "${DBDIR}"
chown -fRL "$slapd_owner" "${DBDIR}"
chmod 700 "${DBDIR}"
done
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
if checkyesno slapd_cn_config; then
chown -R $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
chown -fR $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
else
chown $slapd_owner "%%PREFIX%%/etc/openldap/slapd.conf"
fi

View file

@ -46,7 +46,7 @@ CONFLICTS_INSTALL= ${PORTNAME}2[0-57-9]-server ${PORTNAME}-server
GNU_CONFIGURE= yes
PORTREVISION_CLIENT= 0
PORTREVISION_SERVER= 1
PORTREVISION_SERVER= 2
OPENLDAP_SHLIB_MAJOR= 2
OPENLDAP_SHLIB_MINOR= 0.200

View file

@ -99,13 +99,13 @@ start_precmd()
mkdir -p "${DBDIR}"
[ -f "%%PREFIX%%/etc/openldap/DB_CONFIG.example" ] && cp "%%PREFIX%%/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
fi
chown -RL "$slapd_owner" "${DBDIR}"
chown -fRL "$slapd_owner" "${DBDIR}"
chmod 700 "${DBDIR}"
done
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
if checkyesno slapd_cn_config; then
chown -R $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
chown -fR $slapd_owner "%%PREFIX%%/etc/openldap/slapd.d"
else
chown $slapd_owner "%%PREFIX%%/etc/openldap/slapd.conf"
fi