Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 7ca84d00a753576dfaee15bac39038f0 > files > 356

mrtg-2.14.5-4.el5.x86_64.rpm

#!/usr/bin/perl
# -*- mode: Perl -*-
##################################################################
# This file controls the creation of all the MRTG config files from OV
##################################################################
# Created by Laurie Gellatly <gellatly@one.net.au>
# See newrtrov.txt for a description of what is performed
#################################################################
#
# Distributed under the GNU copyleft
#
# $Id: ovtst,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
#
use Socket;
use strict;
use vars '$DEBUG';
my $DEBUG = 0;
my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";
my $rundir = "/opt/mrtg/run";
my $testout = "test.out";
my $roothtml = "routers.html";

my($router,$sysn,$sysncfg,$sysnhtml,$cnt,@sysipnms,@mrtgc,@sysnms); 

sub main {

   chdir $rundir;
   @sysnms=%ENV;
   chomp(@sysipnms);
   open (MRTGC,">".$testout);
   for ($cnt = 0; $cnt < @sysnms ; $cnt++){
      print MRTGC "$sysnms[$cnt]\n";
   }
   close (MRTGC);
   }  
main;
exit(0);