Des petits bouts qui trainent...
darcs-hash:20080914175029-ffbb2-6ded54fb8ed2bfd11094f736ab25e0e38e2cd96f.gz
This commit is contained in:
parent
cceeea27bb
commit
482b7d21bc
1 changed files with 7 additions and 8 deletions
|
@ -66,20 +66,19 @@ if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
|
||||||
|
|
||||||
if ($0 =~ /^(?:|.*\/)snmp_([^_]+)_if_([^_]+)_(.+)$/)
|
if ($0 =~ /^(?:|.*\/)snmp_([^_]+)_if_([^_]+)_(.+)$/)
|
||||||
{
|
{
|
||||||
$host = $1;
|
$host = $1;
|
||||||
$name = $2;
|
$name = $2;
|
||||||
$iface = $3;
|
$iface = $3;
|
||||||
if ($host =~ /^([^:]+):(\d+)$/)
|
if ($host =~ /^([^:]+):(\d+)$/)
|
||||||
{
|
{
|
||||||
$host = $1;
|
$host = $1;
|
||||||
$port = $2;
|
$port = $2;
|
||||||
}
|
}
|
||||||
if ($host !~ /\.adm\.crans\.org$/)
|
if ($host !~ /\.adm\.crans\.org$/)
|
||||||
{
|
{
|
||||||
$host .= ".adm.crans.org";
|
$host .= ".adm.crans.org";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Host:$host\nName:$name\niface:$iface\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue