[tw] - automated postalias call in init script
- removed postconf call from spec file: moved changes into patch
This commit is contained in:
parent
10a61439f3
commit
c68aa8cf28
11
postfix-2.1.5-aliases.patch
Normal file
11
postfix-2.1.5-aliases.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- postfix-2.1.5/conf/main.cf.aliases 2004-10-18 13:57:18.932558373 +0200
|
||||
+++ postfix-2.1.5/conf/main.cf 2004-10-18 13:57:27.162425581 +0200
|
||||
@@ -384,7 +384,7 @@
|
||||
#
|
||||
#alias_database = dbm:/etc/aliases
|
||||
#alias_database = dbm:/etc/mail/aliases
|
||||
-#alias_database = hash:/etc/aliases
|
||||
+alias_database = hash:/etc/aliases
|
||||
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
|
||||
|
||||
# ADDRESS EXTENSIONS (e.g., user+foo)
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# postfix Postfix Mail Transfer Agent
|
||||
#
|
||||
@ -34,7 +34,20 @@ RETVAL=0
|
||||
start() {
|
||||
# Start daemons.
|
||||
echo -n "Starting postfix: "
|
||||
/usr/sbin/postalias /etc/aliases
|
||||
alias_database=$(postconf -h alias_database 2>/dev/null)
|
||||
RETVAL=1
|
||||
[ -z "$alias_database" ] && {
|
||||
failure "determination of alias_database"
|
||||
echo
|
||||
return 0
|
||||
}
|
||||
/usr/sbin/postalias "$alias_database" 2>/dev/null
|
||||
RETVAL=$?
|
||||
[ $RETVAL -ne 0 ] && {
|
||||
failure "postalias \"$alias_database\""
|
||||
echo
|
||||
return 0
|
||||
}
|
||||
/usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix
|
||||
|
14
postfix.spec
14
postfix.spec
@ -47,7 +47,7 @@
|
||||
Name: postfix
|
||||
Summary: Postfix Mail Transport Agent
|
||||
Version: 2.1.5
|
||||
Release: 2.1
|
||||
Release: 2.2
|
||||
Epoch: 2
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.postfix.org
|
||||
@ -110,6 +110,7 @@ Patch3: postfix-alternatives.patch
|
||||
Patch4: postfix-hostname-fqdn.patch
|
||||
Patch5: postfix-2.1.1-pie.patch
|
||||
Patch6: postfix-2.1.1-obsolete.patch
|
||||
Patch7: postfix-2.1.5-aliases.patch
|
||||
|
||||
# Optional patches - set the appropriate environment variables to include
|
||||
# them when building the package/spec file
|
||||
@ -211,6 +212,7 @@ patch --fuzz=3 -p1 -b -z .config < %{P:1}
|
||||
%patch4 -p1 -b .postfix-hostname-fqdn
|
||||
%patch5 -p1 -b .pie
|
||||
%patch6 -p1 -b .obsolete
|
||||
%patch7 -p1 -b .aliases
|
||||
|
||||
%if %{PFLOGSUMM}
|
||||
gzip -dc %{SOURCE53} | tar xf -
|
||||
@ -326,12 +328,6 @@ done
|
||||
perl -pi -e "s,/usr/local/bin/perl,/usr/bin/perl,g" $RPM_BUILD_ROOT%{postfix_doc_dir}/TLS/contributed/loadCAcert.pl
|
||||
%endif
|
||||
|
||||
# Change alias_maps and alias_database default directory to %{postfix_config_dir}
|
||||
bin/postconf -c $RPM_BUILD_ROOT%{postfix_config_dir} -e \
|
||||
"alias_maps = hash:/etc/aliases" \
|
||||
"alias_database = hash:/etc/aliases" \
|
||||
|| exit 1
|
||||
|
||||
# This installs into the /etc/rc.d/init.d directory
|
||||
/bin/mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
install -c %{_sourcedir}/postfix-etc-init.d-postfix \
|
||||
@ -562,6 +558,10 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 18 2004 Thomas Woerner <twoerner@redhat.com> 2:2.1.5-2.2
|
||||
- automated postalias call in init script
|
||||
- removed postconf call from spec file: moved changes into patch
|
||||
|
||||
* Fri Oct 15 2004 Thomas Woerner <twoerner@redhat.com> 2:2.1.5-2.1
|
||||
- removed aliases from postfix-files (#135840)
|
||||
- fixed postalias call in init script
|
||||
|
Loading…
Reference in New Issue
Block a user