Parent Directory | Revision Log | Patch
revision 193 by dpavlin, Fri Aug 7 14:08:21 2009 UTC | revision 194 by dpavlin, Mon Aug 10 17:30:01 2009 UTC | |
---|---|---|
# | Line 44 sub client_ip { | Line 44 sub client_ip { |
44 | ||
45 | my $ip; | my $ip; |
46 | ||
47 | if ( -e "$conf/mac/$mac" ) { | if ( $ip = client::ip_from_mac( $mac ) ) { |
$ip = read_file "$conf/mac/$mac"; | ||
48 | print "RENEW $mac $ip\n"; | print "RENEW $mac $ip\n"; |
49 | return $ip; | return $ip; |
50 | } else { | } else { |
51 | $ip = client::next_ip; | $ip = client::next_ip; |
52 | print "NEW $mac $ip\n"; | print "NEW $mac $ip\n"; |
53 | write_file "$conf/mac/$mac", $ip; | symlink "$conf/ip/$ip", "$conf/mac/$mac"; |
54 | } | } |
55 | ||
56 | my $ip_path = "$conf/ip/$ip"; | my $ip_path = "$conf/ip/$ip"; |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |