Des petits bouts qui trainent...

darcs-hash:20080914175029-ffbb2-6ded54fb8ed2bfd11094f736ab25e0e38e2cd96f.gz
This commit is contained in:
Nicolas Dandrimont 2008-09-14 19:50:29 +02:00
parent cceeea27bb
commit 482b7d21bc

View file

@ -66,20 +66,19 @@ if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
if ($0 =~ /^(?:|.*\/)snmp_([^_]+)_if_([^_]+)_(.+)$/)
{
$host = $1;
$host = $1;
$name = $2;
$iface = $3;
if ($host =~ /^([^:]+):(\d+)$/)
{
$host = $1;
$port = $2;
}
$iface = $3;
if ($host =~ /^([^:]+):(\d+)$/)
{
$host = $1;
$port = $2;
}
if ($host !~ /\.adm\.crans\.org$/)
{
$host .= ".adm.crans.org";
}
print "Host:$host\nName:$name\niface:$iface\n";
}
else
{