Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - halsbox

Pages: [1]
1
Thank you so much, opensesame!

Had same problem on fresh install of 5.0.10. Solved it with your instructions except for not creating a new "dhcpduser", but using the already present "dns-{MYDC_HOSTNAME}" user. Also did not have problems with restarting the DNS module from the dashboard (and no errors in log), thus no need to apply DNS.pm patch.

Here is a quick dirty patch for /usr/share/perl5/Text/DHCPLeases/Object.pm to get rid of dhcp leases file parsing warnings in log:
Code: [Select]
--- /usr/share/perl5/Text/DHCPLeases/Object.pm.orig 2012-12-07 22:35:44.000000000 +0400
+++ //usr/share/perl5/Text/DHCPLeases/Object.pm 2017-12-04 03:04:38.702611203 +0300
@@ -156,9 +156,14 @@
 sub parse{
     my ($self, $lines) = @_;
     my %obj;
+    my $event_block = 0;
     for ( @$lines ){
  $_ =~ s/^\s+//o;
  $_ =~ s/\s+$//o;
+ if ($event_block){
+     $event_block = 0 if ( /\}/);
+     next;
+ }
  next if ( /^#|^$|\}$/o );
  if ( /^lease ($IPV4) /o ){
      $obj{type} = 'lease';
@@ -211,13 +216,11 @@
      $obj{'option_agent_remote_id'} = $1;
  }elsif ( /set (\w+) = (.*);/o ){
      $obj{set}{$1} = $2;
- }elsif ( /on (.*) \{(.*)\};/o ){
+ }elsif ( /on\s+(.*)\s+\{/ ){
      my $events     = $1;
      my @events = split /\|/, $events;
-     my $statements = $2;
-     my @statements = split /\n;/, $statements;
      $obj{on}{events}     = @events;
-     $obj{on}{statements} = @statements;
+     $event_block = 1;
  }elsif ( /bootp;/o ){
      $obj{bootp} = 1;
  }elsif ( /reserved;/o ){
@@ -238,6 +241,8 @@
      $obj{ddns_fwd_name} = $1;
  }elsif (/set ddns-txt = \"(.*)\";/o){
      $obj{ddns_txt} = $1;
+ }elsif (/set vendor-class-identifier = \"(.*)\";/){
+            $obj{ddns_txt} = $1;
  }else{
      carp "Text::DHCPLeases::Object::parse Error: Statement not recognized: '$_'\n";
  }

Pages: [1]