Detect version 4 properly
authorJamie Cameron <jcameron@webmin.com>
Thu, 9 Jul 2009 05:24:32 +0000 (05:24 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 9 Jul 2009 05:24:32 +0000 (05:24 +0000)
dhcpd/dhcpd-lib.pl

index d7f8c5e..ada4e40 100755 (executable)
@@ -812,6 +812,7 @@ ${$_[0]} = $out;
 return $config{'version'} if ($config{'version'});
 return undef if ($out !~ /DHCP/ || $out =~ /V1/);
 return $out =~ /\sV([0-9\.]+)/ ? $1 :
+       $out =~ /\sDHCP\s+Server\s+([0-9\.]+)/ ? $1 :
        $out =~ /-T/ ? 3 : 2;
 }