Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612262 - mail-mta/exim: Bashisms in init script
Summary: mail-mta/exim: Bashisms in init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-10 23:04 UTC by Dustin C. Hatch
Modified: 2017-03-11 07:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin C. Hatch 2017-03-10 23:04:00 UTC
When /bin/sh does not point to bash, the following errors are printed when starting /etc/init.d/exim:

/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: [[: not found
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: /var/spool/exim/db/retry: Permission denied
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: [[: not found
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: /var/spool/exim/db/retry.lockfile: Permission denied
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: [[: not found
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: /var/spool/exim/db/wait-remote_smtp: Permission denied
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: [[: not found
/lib/rc/sh/openrc-run.sh: 19: /lib/rc/sh/openrc-run.sh: /var/spool/exim/db/wait-remote_smtp.lockfile: Permission denied

These are caused by using the non-standard [[ command:

[[ ${db} == *".lockfile" || ${db} == *"*" ]] && continue

Fortunately, this can easily be replaced with a case statement.
Comment 1 Fabian Groffen gentoo-dev 2017-03-11 07:58:38 UTC
I fixed this for 4.89, thanks!