Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51967 - qmail-smtpd fails to start when /bin/sh is not Bash
Summary: qmail-smtpd fails to start when /bin/sh is not Bash
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29485
  Show dependency tree
 
Reported: 2004-05-24 22:13 UTC by Jonathan Rogers
Modified: 2005-02-19 02:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
A patch to /var/qmail/supervise/qmail-smtpd/run to replace "source" with "." (run.patch,531 bytes, patch)
2004-05-24 22:17 UTC, Jonathan Rogers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Rogers 2004-05-24 22:13:36 UTC
The shell script that supervise uses to start qmail-smtpd (/var/qmail/supervise/qmail-smtpd/run) uses the "source" keyword to extract values from several configuration files. This is a valid keyword in Bash, but the standard Bourne shell keyword is "." (dot). The script has an interpreter trigger of "#!/bin/sh", so it does not extract the configuration values if /bin/sh is not Bash and the service doesn't start.

Reproducible: Always
Steps to Reproduce:
1. merge net-mail/qmail-1.03-r13 and app-shells/ash-1.6
2. make /bin/sh a link to ash
3. attempt to start qmail-smtpd

Actual Results:  
The qmail-smtpd service will not start and there are lines like the following in
/var/log/qmail/qmail-smtpd/current:

4000000040b2cdb1368ffabc tcpserver: usage: tcpserver [ -461UXpPhHrRoOdDqQv ] [
-c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid ] [ -b b
acklog ] [ -l localname ] [ -t timeout ] [ -I interface ] host port program

Expected Results:  
The qmail-smtpd service should have started.
Comment 1 Jonathan Rogers 2004-05-24 22:17:31 UTC
Created attachment 31978 [details, diff]
A patch to /var/qmail/supervise/qmail-smtpd/run to replace "source" with "."

This patch seems to make the script work properly with ash installed as
/bin/sh. An alternative would be to simply change the "#!/bin/sh" to
"#!/bin/bash"
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-05-24 23:50:08 UTC
i'm going to change to doing /bin/bash, as I do use a lot of other bashisms in some of the scripts.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-15 02:20:15 UTC
clearing up my bug tracking
Comment 4 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-01-03 12:55:33 UTC
Fixed in CVS, could you test it, please?
Comment 5 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-02-19 02:45:58 UTC
Closing