637e9aa312
Patch .aliases fixed Resolves: #699826
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
diff -up ypserv-2.26/acinclude.m4.aliases ypserv-2.26/acinclude.m4
|
|
--- ypserv-2.26/acinclude.m4.aliases 2012-01-12 15:49:32.325205914 +0100
|
|
+++ ypserv-2.26/acinclude.m4 2012-01-12 15:50:07.570203506 +0100
|
|
@@ -92,3 +92,18 @@ AC_DEFUN([TYPE_SOCKLEN_T],
|
|
AC_DEFINE([socklen_t], [int], [Define if socklen_t is missing])
|
|
fi
|
|
])
|
|
+
|
|
+
|
|
+dnl
|
|
+dnl Find where aliases file is located
|
|
+dnl It can be in /etc/aliases or /etc/mail/aliases
|
|
+dnl If file path is specified in argument and file path exists, it is used.
|
|
+dnl
|
|
+AC_DEFUN([FIND_ALIASES_PATH], [
|
|
+AC_MSG_CHECKING(for aliases file path)
|
|
+tmp_aliases="$1"
|
|
+test -f /etc/mail/aliases && tmp_aliases="/etc/mail/aliases"
|
|
+test -f /etc/aliases && tmp_aliases="/etc/aliases"
|
|
+AC_MSG_RESULT($tmp_aliases)
|
|
+AC_SUBST(ALIASES, $tmp_aliases)
|
|
+])
|
|
diff -up ypserv-2.26/configure.in.aliases ypserv-2.26/configure.in
|
|
--- ypserv-2.26/configure.in.aliases 2012-01-12 15:48:52.068208666 +0100
|
|
+++ ypserv-2.26/configure.in 2012-01-12 15:49:17.842206905 +0100
|
|
@@ -149,7 +149,7 @@ fi
|
|
AC_SUBST(MAKE)
|
|
|
|
dnl Check for aliases path
|
|
-AC_PATH_PROG(ALIASES, aliases, /etc/mail/aliases, /etc/mail:/etc)
|
|
+FIND_ALIASES_PATH(/etc/aliases)
|
|
|
|
|
|
|