Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure --with-default-mail-command-path: specify default mail command #100

Closed
wants to merge 1 commit into from

Conversation

schaal
Copy link
Contributor

@schaal schaal commented Jan 2, 2017

Add option to configure to specify the default mail command, if not given falls back to config.h as of now

@schaal schaal force-pushed the mailcommand branch 2 times, most recently from f842d0a to c77d2e7 Compare January 2, 2017 14:51
Copy link
Contributor

@sergey-v sergey-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok for me.

and mail it to the recipient. The default mail command is \fB/bin/mail
-s\fR.
and mail it to the recipient. The default mail command is shown in the
output from \fBlogrotate --help\fR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever. however this is .in file, so @DEFAULT_MAIL_COMMAND@ should be available as autoconf substitution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to keep the current definitions from config.h if configure is called without this option, but then @DEFAULT_MAIL_COMMAND@ is not available in autoconf

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then by me. ideally the config.h platform defaults should be moved to configure or dropped at all.

@@ -64,6 +64,22 @@ AC_ARG_WITH([state-file-path],
AC_DEFINE_UNQUOTED([STATEFILE], "$STATE_FILE_PATH")
AC_SUBST(STATE_FILE_PATH)

AC_ARG_WITH([default-mail-command-path],
AC_HELP_STRING([--with-default-mail-command-path=PATH],
[path to default mail command (based on config.h if not given)]),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not "path", but "command", i.e the default value is "path" + "arguments": /bin/mail -s, so --with-default-mail-command would be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, makes more sense, will update with your suggestion

@schaal schaal force-pushed the mailcommand branch 2 times, most recently from e2bdf7d to fb9769d Compare January 2, 2017 16:12
@kdudka
Copy link
Member

kdudka commented Jan 2, 2017 via email

[
case "$withval" in
yes|no)
AC_MSG_ERROR([--with-default-mail-command-path=COMMAND requires a command to be specified])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants