diff options
author | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-11-15 23:49:00 +0700 |
---|---|---|
committer | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-11-15 23:49:00 +0700 |
commit | 6175bcb25ab281390023561ef15b96a44b2dffbb (patch) | |
tree | 8b07979f0b0e56fef90b955cec59aa0b908c8609 /scripts/dhcpv6-client-show-leases.pl | |
parent | 9fd90ff1bf6ce9f8044fab99ecb70f8506e3a116 (diff) | |
parent | 29eb9a1f7ecb1af6167093163b2bf9de48a7cf08 (diff) | |
download | vyatta-op-6175bcb25ab281390023561ef15b96a44b2dffbb.tar.gz vyatta-op-6175bcb25ab281390023561ef15b96a44b2dffbb.zip |
Merge branch 'oxnard' of git.vyatta.com:/git/vyatta-op into oxnard
Diffstat (limited to 'scripts/dhcpv6-client-show-leases.pl')
-rw-r--r-- | scripts/dhcpv6-client-show-leases.pl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/dhcpv6-client-show-leases.pl b/scripts/dhcpv6-client-show-leases.pl index 546668c..44be689 100644 --- a/scripts/dhcpv6-client-show-leases.pl +++ b/scripts/dhcpv6-client-show-leases.pl @@ -74,13 +74,11 @@ my %ghash = (); foreach my $lease_filename (@lease_files) { my @lines=(); - if (!open(LEASE_FILE, "</var/lib/dhcp3/$lease_filename")) { - printf("Can't open lease file for reading: $lease_filename\n"); - exit 1; - } + open(my $f, '<', "/var/lib/dhcp3/$lease_filename") + or die "Can't open lease file for reading: $lease_filename\n"; - @lines = <LEASE_FILE>; - close(LEASE_FILE); + @lines = <$f>; + close $f; chomp @lines; my $level = 0; |