#!/usr/bin/perl

$ip_map = $ARGV[0];
$name = $ARGV[1];

# printf "Now try to open file \"$ip_map\" to lookup $names\n";

open(IP_FILE, "$ip_map") or die "Cannot open mapping file $ip_map";
while ( <IP_FILE> ) {
    chomp;
    # printf "Now read line \"$_\"\n";
    ( $node, $ip ) = split(' ');
    $mapping{ $node } = $ip;
    # printf "Add mapping [ $node, $ip ]\n";
}

# printf "Now lookup $name\n";
print "$mapping{ $name }\n";

Add IP address mapper for use in run-das
Add IP address mapper for use in run-das


git-svn-id: f22e84ca493ccad7df8d2727bca69d1c9fc2e5c5@2234 aaf88347-d911-0410-b711-e54d386773bb
