Bug 62358 - broken condrestart in init script
broken condrestart in init script
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: postfix (Show other bugs)
7.3
i386 Linux
medium Severity high
: ---
: ---
Assigned To: wdovlrrw
:
Depends On:
Blocks: 61590
  Show dependency treegraph
 
Reported: 2002-03-30 01:27 EST by Chris Ricker
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-07 04:23:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ricker 2002-03-30 01:27:26 EST
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 04:21:06 EDT
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 04:23:13 EDT
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 07:10:23 EDT
Fixed in 1.1.7-2

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