diff options
author | Chris Rees <crees@FreeBSD.org> | 2022-01-16 19:18:53 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2022-01-16 19:26:46 +0000 |
commit | 27f7397a8f598df0953ed8f9db562308ac6f1bee (patch) | |
tree | b5ea77c72188cd9f0cd4c91910c04df72457b44c | |
parent | 8b5f30b6de5dce432f8c23ef6d00fa1a31443a7e (diff) | |
download | ports-27f7397a8f598df0953ed8f9db562308ac6f1bee.tar.gz ports-27f7397a8f598df0953ed8f9db562308ac6f1bee.zip |
mail/opendkim: Silence RC script warning
Reported by: Herbert J. Skuhra <herbert@gojira.at>
-rw-r--r-- | mail/opendkim/Makefile | 2 | ||||
-rw-r--r-- | mail/opendkim/files/milter-opendkim.in | 26 |
2 files changed, 19 insertions, 9 deletions
diff --git a/mail/opendkim/Makefile b/mail/opendkim/Makefile index 620252c2fff5..7e8e2f02bda1 100644 --- a/mail/opendkim/Makefile +++ b/mail/opendkim/Makefile @@ -2,7 +2,7 @@ PORTNAME= opendkim PORTVERSION= 2.10.3 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= mail security MASTER_SITES= SF/${PORTNAME} \ SF/${PORTNAME}/Previous%20Releases \ diff --git a/mail/opendkim/files/milter-opendkim.in b/mail/opendkim/files/milter-opendkim.in index 8d83197d8884..7672c9352e68 100644 --- a/mail/opendkim/files/milter-opendkim.in +++ b/mail/opendkim/files/milter-opendkim.in @@ -69,7 +69,11 @@ sig_reload="USR1" dkim_cleansockets() { - rm -f "${milteropendkim_socket##local:}" "${milteropendkim_socket##unix:}" + case ${milteropendkim_socket%:*} in + local|unix) + rm -f "${milteropendkim_socket#*:}" + ;; + esac } dkim_get_pidfile() @@ -85,19 +89,25 @@ dkim_prepcmd() { dkim_cleansockets dkim_get_pidfile - install -d -o ${milteropendkim_uid%:*} -g $milteropendkim_gid \ - -m ${milteropendkim_socket_perms} ${pidfile%/*} + case ${milteropendkim_socket%:*} in + local|unix) + socketfile=${milteropendkim_socket#*:} + install -d -o ${milteropendkim_uid%:*} -g $milteropendkim_gid \ + -m ${milteropendkim_socket_perms} \ + ${pidfile%/*} ${socketfile%/*} + ;; + esac } dkim_start_postcmd() { - if [ -n "${milteropendkim_socket}" ] ; then + case ${milteropendkim_socket%:*} in + local|unix) # postcmd is executed too fast and socket is not created before checking... sleep 1 - chmod -f ${milteropendkim_socket_perms} \ - ${milteropendkim_socket##local:} \ - ${milteropendkim_socket##unix:} - fi + chmod -f ${milteropendkim_socket_perms} ${milteropendkim_socket#*:} + ;; + esac } if [ -n "$2" ]; then |