scripts: touchups for v12.0.0#3144
Conversation
to the ClamAV setup where it actually belongs
|
Test failure is expected; waiting for #3134 to get merged. |
polarathene
left a comment
There was a problem hiding this comment.
LGTM 👍
Small suggestion that might make sense with ONE_DIR=1
| elif [[ ${ONE_DIR} -eq 1 ]] | ||
| then | ||
| _log 'warn' "'ONE_DIR=1' but no volume was mounted to '${STATEDIR}'" | ||
| else | ||
| _log 'debug' 'Not consolidating state (because it has been disabled)' |
There was a problem hiding this comment.
I haven't looked into it, but since ONE_DIR=1 is default, if the only usage is here now, perhaps variables.sh should default to ONE_DIR=0 if ENV is unset, and only change it to ONE_DIR=1 if /var/mail-state exists?
There was a problem hiding this comment.
Did I miss something here? ONE_DIR is used above in conjunction with && [[ -d ${STATE_DIR} ]] - this is an elif case, not an if case 🙂
There was a problem hiding this comment.
Did I miss something here?
The warning would always be output with variables.sh setting ONE_DIR=1 as default? (unless there is an explicit opt-out with ONE_DIR=0).
EDIT: For UX you can ignore the below content. Your decision here is the right way to go 👍 (opt-out of warning via explicit ONE_DIR=0)
I think I had another comment in this thread that didn't seem to get added during review 😬
I was proposing variables.sh to set ONE_DIR=1 if /var/mail-state existed, so that the warning here would not show up by default.
- The test suite doesn't run with a
/var/mail-statevolume in any tests, so we technically useONE_DIR=0. - It used to be opt-in ENV until the default was changed. Since we expect it at
/var/mail-stateanyway, we could just derive it that way. ONE_DIRis not used anywhere else in our scripts, just special handling inmail_state.sh.- The warning then becomes redundant, opt-in via existence of
/var/mail-state.
Then again, if there is no explicit opt-out with ONE_DIR=0, for new users especially it probably does make sense to display a warning 👍
There was a problem hiding this comment.
The error message is not triggerd, when ENABLE_SRS=1 and ONE_DIR=1 is set and no volume is mounted, because the directory is created in the setup process here:
There was a problem hiding this comment.
Any idea how to solve that?
There was a problem hiding this comment.
SRS seems pretty broken to me. For example, SRS stores stuff in ${POSTSRSD_STATE_DIR}, however there is no symlink pointing to it..
I will take a closer look later.
Description
Touchups for the upcoming v12.0.0 release. Each commit resolved a small nitpick. Feel free to add yours as well! Should be easily reviewable commit-by-commit. Only small changes allowed 😉
Fixes #
Type of change
Checklist:
docs/)