Bug 62358

Summary: broken condrestart in init script
Product: [Retired] Red Hat Linux Reporter: Chris Ricker <chris.ricker>
Component: postfixAssignee: wdovlrrw <brosenkr>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-07 08:23:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 61590    

Description Chris Ricker 2002-03-30 06:27:26 UTC
When upgrading from postfix-1.1.4-3 (what shipped in beta3) to postfix-1.1.5-3
(current in rawhide), I get the following:

/etc/init.d/postfix: restart: command not found

The problem is that the postfix RPMs do:

postuninstall scriptlet (through /bin/sh):
if [ "$1" != 0 ]; then
        /sbin/service postfix condrestart 2>&1 > /dev/null
fi
exit 0


This service command fails b/c the postscript init script does not correctly
support condrestart:

[kaboom@skuld foo]$ sudo service postfix condrestart
/etc/init.d/postfix: restart: command not found
[kaboom@skuld foo]$

Comment 1 Chris Ricker 2002-04-07 08:21:06 UTC
This can be fixed by adding a restart function to /etc/init.d/postfix, something
like:

restart() {
        stop
        start
}


or by changing condrestart to

if [ -f ] then


Comment 2 Chris Ricker 2002-04-07 08:23:13 UTC
Oops, somehow hit return...

At any rate, an 

if [ -f /var/lock/subsys/postfix ] ; then
  stop
  start
fi

should also work

Comment 3 Bernhard Rosenkraenzer 2002-04-15 11:10:23 UTC
Fixed in 1.1.7-2