Hi Spud,

Yes, you're right. I've seen that the '<pre>' HTML tag was eating the 
character 'less than' ('<'), and the final code was wrong.

I've fixed it, so you can try it again.

Anyway, the patch just changes a 'space' by '\s*', nothing more. So you 
can do it manually if you still can patch it.

Hope that helped you, and sorry for the inconveniences.
Regards.

---
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat



A 2014-04-18 06:37, Spud escrigué:
> Hi Jordi,
> 
> Sorry about the delay in getting back to you but have been very busy
> over the last week.
> 
> Anyway...
> 
> I copied this from the website and called it fix.patch
> 
> --- /usr/lib/monitorix/fs.pm [4]    2014-03-24 15:00:59.000000000
> +0100
> +++ fs.pm [4]    2014-04-03 22:09:23.000000000 +0200
> @@ -191,7 +191,7 @@
>          if(/</row>/) {
>               my $str = $_;
>             my $n = 0;
> -            $str =~ s/( </v>)/++$n % 3 == 0 ? " $1 NaN </v>
> NaN </v> NaN </v> NaN </v> NaN </v>" : $1/eg;
> +            $str =~ s/(s*</v>)/++$n % 3 == 0 ? " $1 NaN </v>
> NaN </v> NaN </v> NaN </v> NaN </v>" : $1/eg;
>              print OUT $str;
>             next;
>         }
>      
> 
> cd to /usr/lib/monitorix and type "patch -u fs.pm [4] fix.patch"
> 
> And get this error
> 
> patching file fs.pm [4]
> Hunk #1 FAILED at 191.
> patch unexpectedly ends in middle of line
> 1 out of 1 hunk FAILED -- saving rejects to file fs.pm.rej
> patch unexpectedly ends in middle of line
> 
> Heres the contents of fs.pm.rej
> 
> --- fs.pm [4]       2014-03-24 15:00:59.000000000 +0100
> +++ fs.pm [4]       2014-04-03 22:09:23.000000000 +0200
> @@ -191,7 +191,7 @@
>                  if(/</row>/) {
>                         my $str = $_;
>                         my $n = 0;
> -                       $str =~ s/( </v>)/++$n %
> 3 == 0 ? " $1 NaN </v> NaN </v> NaN </v> NaN </v> NaN </v>" : $1/eg;
>  +                       $str =~ s/(s*</v>)/++$n
> % 3 == 0 ? " $1 NaN </v> NaN </v> NaN </v> NaN </v> NaN </v>" : $1/eg;
>                         print OUT $str;
>                         next;
>                  }
> 
> So am I doing something wrong here again or whats the story?
> 
> thanks
> 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Monitorix-general mailing list
Monitorix-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monitorix-general

Reply via email to