dhcpd conf 语法错误 - 从 RHEL6 升级到 RHEL7 - dhcp 4.2

问题描述

谁能帮我弄清楚这里的语法问题。此块在 RHEL6 dhcpd.conf (dhcp-4.1.1-63.P1.el6_10.x86_64) 文件中工作,但在我升级到 RHEL7 (dhcp-4.2.5-82.el7.x86_64) 时抛出错误>

 30 on commit {
 31         if (not static and ((config-option server.ddns-updates = null) or (config-option server.ddns-updates != 0))) {
 32                 if exists oe-key {
 33                         set ddns-rev-name = concat (binary-to-ascii (10,8,".",reverse (1,leased-address)),pick (config-option server.ddns-rev-domainname,"in-addr.arpa."));
 34                         set full-oe-key = option oe-key;
 35                         switch (ns-update (delete (IN,25,ddns-rev-name,null),add (IN,full-oe-key,lease-time / 2)))
 36                         {
 37                           default:
 38                           unset ddns-rev-name;
 39                           break;
 40                           case NOERROR:
 41                           on release or expiry {
 42                             switch (ns-update (delete (IN,null))) {
 43                               case NOERROR:
 44                               unset ddns-rev-name;
 45                               break;
 46                             }
 47                           }
 48                         }
 49                 }
 50         }
 51 }

错误

/etc/dhcp/dhcpd.conf line 35: expecting expression.
                        switch (ns-update (delete 

看来参数RELNOTES有一些变化

775 - Replaced ifconfig parameters "add" and "delete" with "alias" and "-alias" 
776 for IPv6 mode in the client scripts,netbsd and openbsd. This was 
777 preventing IPv6 addresses from being added or removed from interfaces. 778 Thanks to Tim Dean for reporting this issue. 779 [ISC-bugs #31573] 

现在有没有人更深入地了解如何构建这些 confs 以包括添加删除和切换案例?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)