![](https://secure.gravatar.com/avatar/3aa281fe71ed25158ac038a1493907c9.jpg?s=120&d=mm&r=g)
Hey,
for me (recent ubuntu) the rancid integration wasn't working quite well. The following patch corrects this:
--- showconfig.inc.php.old 2014-06-17 18:05:06.341845752 +0200 +++ showconfig.inc.php 2014-06-17 18:03:08.336048633 +0200 @@ -72,12 +72,12 @@
if ($config['rancid_ignorecomments']) { - $lines = explode('\n',$text); + $lines = explode(PHP_EOL,$text); for ($i = 0;$i < count($lines);$i++) { - if ($lines[$i][0] == '#') { unset($lines[$i]); } + if ($lines[$i][0] == '!') { unset($lines[$i]); } } - $text = join('\n',$lines); + $text = join(PHP_EOL,$lines); }
$text = '<pre class="prettyprint linenums">' . PHP_EOL . $text;
Steffen
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
Hah! That looks like a Russian search/replace bug! :D
adam.
On 2014-06-17 11:07, Steffen Klemer wrote:
Hey,
for me (recent ubuntu) the rancid integration wasn't working quite well. The following patch corrects this:
--- showconfig.inc.php.old 2014-06-17 18:05:06.341845752 +0200 +++ showconfig.inc.php 2014-06-17 18:03:08.336048633 +0200 @@ -72,12 +72,12 @@
if ($config['rancid_ignorecomments']) {
- $lines = explode('\n',$text);
- $lines = explode(PHP_EOL,$text);
for ($i = 0;$i < count($lines);$i++) {
if ($lines[$i][0] == '#') { unset($lines[$i]); }
if ($lines[$i][0] == '!') { unset($lines[$i]); }
}
- $text = join('\n',$lines);
- $text = join(PHP_EOL,$lines);
}
$text = '<pre class="prettyprint linenums">' . PHP_EOL . $text;
Steffen
-- Steffen Klemer E-Mail: Steffen.Klemer@gwdg.de Tel: +49 551 39 172361 __________________________________________________________________ GWDG Am Fassberg 11, 37077 Göttingen URL: http://www.gwdg.de E-Mail: gwdg@gwdg.de Tel.: +49 (0)551 201-1510 Fax: +49 (0)551 201-2150 Geschäftsführer: Prof. Dr. Ramin Yahyapour Aufsichtsratsvorsitzender: Dipl.-Kfm. Markus Hoppe Sitz der Gesellschaft: Göttingen Registergericht: Göttingen Handelsregister-Nr. B 598 _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (2)
-
Adam Armstrong
-
Steffen Klemer