[Debian-ha-maintainers] [Linux-ha-dev] [patch] low: init script: don't use -e argument to echo

Lars Ellenberg lars.ellenberg at linbit.com
Wed Mar 10 10:34:16 UTC 2010


On Wed, Mar 10, 2010 at 11:14:51AM +1100, Simon Horman wrote:
> The -e argument to echo does not seemed to be supported by dash
> and is treated as an literal.
> 
> # bash -c "echo -e fish"
> fish
> # dash -c "echo -e fish"
> -e fish

Ok, pushed: changeset 12549 df7495bf8ed0

> The simple fix seems to be to just remove -e from invocations of echo.
> the echo(1) man page documents the -e option as:
> 
> 	-e     enable interpretation of backslash escapes
> 
> But none of the strings printed include such escape sequences.
> 
> This change removes the -e from the output if the init script
> on systems where /bin/sh is dash:
> 
> # /etc/init.d/heartbeat start
> Starting High-Availability services: mkdir: cannot create directory
> `/var/run/heartbeat': File exists

That should no longer happen, either,
there is test -d $D || mkdir $D.
(because -p of mkdir may not be there either)

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.



More information about the Debian-ha-maintainers mailing list