Mailing List Archive

drbd perl script
Yesterday I upgraded my copy of the drbd cvs and found a little bug on the
drbd script, I now is work in progress, but I supose it's O.K. to pass the
bugs I found.

Here is the cvs diff output:

---
Index: scripts/drbd
===================================================================
RCS file: /cvshome/drbd/drbd/scripts/drbd,v
retrieving revision 1.4
diff -u -r1.4 drbd
--- scripts/drbd 2001/05/23 14:52:32 1.4
+++ scripts/drbd 2001/05/25 07:41:32
@@ -247,8 +247,8 @@

$mounted=0;
while($line=<MOUNT>) {
- if( index($line,$$mconf{self}{device}) < 0 ) {
- print "pname: $$mconf{self}{device} is already mounted";
+ if( index($line,$$mconf{self}{device}) > -1 ) {
+ print "pname: $$mconf{self}{device} is already mounted\n";
$mounted=1;
}
}
---

--
Sergio Talens-Oliag ........................................................
Intelligent Software Components, S.A. _ _ _ _
Edificio Prima Sant Cugat Telf: +34 93 5677200 @ |_ | || | |
c/. Alcalde Barnils, 64 - 68 mailto:sto@example.com | _||_||_ |_|
08190 Sant Cugat del Vallés (Barcelona) http://www.isoco.com ..............
Re: drbd perl script [ In reply to ]
Thanks a lot!!
I will commit it to CVS immediately.

* Sergio Talens-Oliag <sto@example.com> [010525 09:38]:
> Yesterday I upgraded my copy of the drbd cvs and found a little bug on the
> drbd script, I now is work in progress, but I supose it's O.K. to pass the
> bugs I found.
>
> Here is the cvs diff output:
>
> ---
> Index: scripts/drbd
> ===================================================================
> RCS file: /cvshome/drbd/drbd/scripts/drbd,v
> retrieving revision 1.4
> diff -u -r1.4 drbd
> --- scripts/drbd 2001/05/23 14:52:32 1.4
> +++ scripts/drbd 2001/05/25 07:41:32
> @@ -247,8 +247,8 @@
>
> $mounted=0;
> while($line=<MOUNT>) {
> - if( index($line,$$mconf{self}{device}) < 0 ) {
> - print "pname: $$mconf{self}{device} is already mounted";
> + if( index($line,$$mconf{self}{device}) > -1 ) {
> + print "pname: $$mconf{self}{device} is already mounted\n";
> $mounted=1;
> }
> }
> ---