Mailing List Archive

Datadisk Perl Script
Hi!

I'm no Perl expert but it seems that the datadisk script has some problems
when you have nb1, nb10, nb11 and so on. When looking for nb1 it also
reports (mount) status of all nb1x device.

Hmmm... I did a quick and dirt hack to solve it, but if anyone have a better
solution, please do that. :)

----------------------------------8<---------------------------------------
--- datadisk Thu Dec 20 16:29:56 2001
+++ datadisk.new Thu Dec 20 17:32:45 2001
@@ -263,7 +263,7 @@

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

Regards,

Luis
--
[ Luis Claudio R. Goncalves lclaudio@example.com ]
[. MSc coming soon -- Conectiva HA Team - Gospel User - Linuxer - !Java ]
[. Fault Tolerance - Real-Time - Distributed Systems - IECLB - IS 40:31 ]
[ LateNite Programmer -- My Utmost for His Highest -- ]
Re: Datadisk Perl Script [ In reply to ]
Hi Luis!

I like your patch, .. it is commited to CVS.

-Philipp

* Luis Claudio R. Goncalves <lclaudio@example.com> [011220 20:44]:
> Hi!
>
> I'm no Perl expert but it seems that the datadisk script has some problems
> when you have nb1, nb10, nb11 and so on. When looking for nb1 it also
> reports (mount) status of all nb1x device.
>
> Hmmm... I did a quick and dirt hack to solve it, but if anyone have a better
> solution, please do that. :)
>
> ----------------------------------8<---------------------------------------
> --- datadisk Thu Dec 20 16:29:56 2001
> +++ datadisk.new Thu Dec 20 17:32:45 2001
> @@ -263,7 +263,7 @@
>
> $mounted=0;
> while($line=<MOUNT>) {
> - if( index($line,$$mconf{self}{device}) > -1 ) {
> + if( index($line,"$$mconf{self}{device} ") > -1 ) {
> print "pname: $$mconf{self}{device} is already mounted\n";
> $mounted=1;
> }
> ----------------------------------8<---------------------------------------
>
> Regards,
>
> Luis
> --
> [ Luis Claudio R. Goncalves lclaudio@example.com ]
> [. MSc coming soon -- Conectiva HA Team - Gospel User - Linuxer - !Java ]
> [. Fault Tolerance - Real-Time - Distributed Systems - IECLB - IS 40:31 ]
> [ LateNite Programmer -- My Utmost for His Highest -- ]
>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> https://lists.sourceforge.net/lists/listinfo/drbd-devel
--
: Dipl-Ing Philipp Reisner Tel +43-1-8974897-750 :
: LINBIT Information Technologies GmbH http://www.linbit.com :
: Sechshauserstr 48, 1150 Wien :