Bug 62358 - broken condrestart in init script
Summary: broken condrestart in init script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postfix
Version: 7.3
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: wdovlrrw
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 61590
TreeView+ depends on / blocked
 
Reported: 2002-03-30 06:27 UTC by Chris Ricker
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-07 08:23:18 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.