Mailing List Archive

RedHat 6.x and drbd start script
In the course of testing DRBD in a HA setup, I've found the following
problems:

1. I kept getting 'bad substitution' errors in the drbd script. Changing
the first line from:
#!/bin/sh
to
#!/bin/bash2
fixed this one.

2. After using 'chkconfig' to enable DRBD on startup, I got the error:
/etc/rc.d/rc3.d/S30drbd: Do not know what to do...
changing line 325 from:
drbd) drbd ;;
to
*drbd) drbd ;;
did the trick.

Both these fixes are in the attached patch.

Enjoy!

Cheers,
Chris.
--
***********************************************************************
Disclaimer:

This e-mail is confidential and intended solely for the named recipient.
Any views expressed in this e-mail are those of the individual sender,
and not of dotWAP.com Pty Ltd. Any unauthorised use, dissemination,
forwarding or reproduction of this e-mail is strictly prohibited.

dotWAP.com Pty Ltd does not warrant that this e-mail is free from viruses
or other corruptions and is not liable to the recipient or any other
party should any virus or other corruption be present in this e-mail.
***********************************************************************
Re: RedHat 6.x and drbd start script [ In reply to ]
Chris Anderson <chris.anderson@example.com> wrote:
> This is a multi-part message in MIME format.
> --------------A5FBA9B1679B9A596A70BD51
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> In the course of testing DRBD in a HA setup, I've found the following
> problems:
>
> 1. I kept getting 'bad substitution' errors in the drbd script. Changing
> the first line from:
> #!/bin/sh
> to
> #!/bin/bash2
> fixed this one.

I think that this is a bad idea because not all Linux distributions have a
shell called "bash2"! As far as I know it's RedHat specific. You (or someone
else) should rewrite the script to work properly with bash1 (then it'll work
also with bash2)...

Juri

--
Juri Haberland <juri@example.com>
Re: RedHat 6.x and drbd start script [ In reply to ]
* Chris Anderson <chris.anderson@example.com> [010510 04:03]:
> In the course of testing DRBD in a HA setup, I've found the following
> problems:
>
> 1. I kept getting 'bad substitution' errors in the drbd script. Changing
> the first line from:
> #!/bin/sh
> to
> #!/bin/bash2
> fixed this one.
>
> 2. After using 'chkconfig' to enable DRBD on startup, I got the error:
> /etc/rc.d/rc3.d/S30drbd: Do not know what to do...
> changing line 325 from:
> drbd) drbd ;;
> to
> *drbd) drbd ;;
> did the trick.
>
> Both these fixes are in the attached patch.
>
> Enjoy!

Hi Chris,

Thanks for the patch!
I have applied point 2 to CVS, but point 1 seems to be redhat 6.x
specific, this change will not make it into CVS.

-Philipp