blob: d023680f3b60ec3fd4dbb684abf756762ae3fb98 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 190650e1cd5700cd6950ead3fcb17ebcec192a2e Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Fri, 19 Jun 2015 17:14:58 +0900
4Subject: [PATCH] Change fixed postconf to a variable for cross-compiling
5
6Upstreamstatus: Inappropriate [embedded specific]
7
8Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
9---
10 postfix-install | 18 ++++++++++--------
11 1 file changed, 10 insertions(+), 8 deletions(-)
12
13diff --git a/postfix-install b/postfix-install
14index 1662c3d..d11fa12 100644
15--- a/postfix-install
16+++ b/postfix-install
17@@ -226,8 +226,8 @@ test -z "$non_interactive" -a ! -t 0 && {
18 exit 1
19 }
20
21-test -x bin/postconf || {
22- echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2
23+test -x "$POSTCONF" || {
24+ echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2
25 exit 1
26 }
27
28@@ -248,7 +248,7 @@ do
29 case "$junk" in
30 *MAIL_VERSION*)
31 case "$mail_version" in
32- "") mail_version="`bin/postconf -dhx mail_version`" || exit 1
33+ "") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
34 esac
35 val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1
36 case "$val" in
37@@ -434,7 +434,7 @@ template files main.cf.proto and master.cf.proto."
38
39 : ${install_root=/}
40 : ${tempdir=`pwd`}
41-: ${config_directory=`bin/postconf -c conf -h -d config_directory`}
42+: ${config_directory=`$POSTCONF -c conf -h -d config_directory`}
43
44 # Find out the location of installed configuration files.
45
46@@ -500,7 +500,7 @@ test -f $CONFIG_DIRECTORY/main.cf && {
47 case "$junk" in
48 "") eval unset $name;;
49 esac
50- eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} ||
51+ eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -hx $name\`} ||
52 exit 1
53 done
54 }
55@@ -513,7 +513,7 @@ do
56 case "$junk" in
57 "") eval unset $name;;
58 esac
59- eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1
60+ eval : \${$name=\`$POSTCONF -c conf -d -hx $name\`} || exit 1
61 done
62
63 # Override settings manually.
64@@ -639,6 +639,8 @@ README_DIRECTORY=$install_root$readme_directory
65 SHLIB_DIRECTORY=$install_root$shlib_directory
66 META_DIRECTORY=$install_root$meta_directory
67
68+test "x$POSTCONF" != "x" || POSTCONF="bin/postconf"
69+
70 # Avoid repeated tests for existence of these; default permissions suffice.
71
72 test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
73@@ -810,7 +812,7 @@ IFS="$BACKUP_IFS"
74 # the wrong place when Postfix is being upgraded.
75
76 case "$mail_version" in
77-"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
78+"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
79 esac
80
81 # Undo MAIL_VERSION expansion at the end of a parameter value. If
82@@ -830,7 +832,7 @@ do
83 esac
84 done
85
86-bin/postconf -c $CONFIG_DIRECTORY -e \
87+"$POSTCONF" -c $CONFIG_DIRECTORY -e \
88 "daemon_directory = $daemon_directory" \
89 "data_directory = $data_directory" \
90 "command_directory = $command_directory" \
91--
921.8.4.2
93