Skip to content

Commit

Permalink
use /bin/mail instead of /bin/mailx
Browse files Browse the repository at this point in the history
/bin/mail is a symlink to /bin/mailx on Fedora and /usr/bin/mailx on openSUSE
but openSUSE misses /bin/mailx

Related #181

Signed-off-by: Jakub Filak <jfilak@redhat.com>
  • Loading branch information
Jakub Filak committed Dec 11, 2015
1 parent 842f3f2 commit c9d1387
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ fi

AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test "$enable_doxygen_docs" = "yes")

AC_ARG_WITH(mail,
[AS_HELP_STRING([--with-mail=PATH],
[Path to mail executable (default: /bin/mail)])],
[], [with_mail="/bin/mail"])
AC_SUBST([MAIL_EXE_PATH], [$with_mail])

AC_SUBST(CONF_DIR)
AC_SUBST(DEFAULT_CONF_DIR)
AC_SUBST(VAR_RUN)
Expand Down
1 change: 1 addition & 0 deletions src/plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ reporter_mailx_CPPFLAGS = \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
-DMAIL_EXE_PATH=\"$(MAIL_EXE_PATH)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
-D_GNU_SOURCE
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/reporter-mailx.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void create_and_send_email(

char **args = NULL;
unsigned arg_size = 0;
args = append_str_to_vector(args, &arg_size, "/bin/mailx");
args = append_str_to_vector(args, &arg_size, MAIL_EXE_PATH);

char *dsc = make_description_mailx(problem_data, CD_TEXT_ATT_SIZE_LOGGER);

Expand Down

0 comments on commit c9d1387

Please sign in to comment.