Linksys AC Series Router Configuration Tips for OpenWRT: Difference between revisions
mNo edit summary |
|||
| Line 1,434: | Line 1,434: | ||
rm /var/run/dhcpd.pid | rm /var/run/dhcpd.pid | ||
} | } | ||
</syntaxhighlight>And as of OpenWRT 22.0.Whatever, there's another issue. The path for RESOLV.CONF has changed from /tmp/resolv.conf to /tmp/resolv.conf.d/resolv.conf.auto. That change has been reflected in DNSMASQ, but it has NOT been reflected in DHCPD. Solution: Modify the above noted code shown above for /etc/init/d/dhcpd file as follows;<syntaxhighlight lang="text"> | |||
ln -sf "/tmp/resolv.conf.d/resolv.conf.auto" /tmp/resolv.conf | |||
</syntaxhighlight>The ''ln'' command corrects the symbolic link issue mentioned above. And the ''rm'' command corrects the PID file issue that never goes away, again mentioned above. Also note that if the DHCPD package is ever updated, the script will need to be modified again. A startup script could be written, but haven't had time to write that yet. This post gives a fairly goot hint on how to write it: https://askubuntu.com/questions/77149/how-to-find-text-and-replace-that-line-if-exists-with-terminal-otherwise-just-ap Although regular expressions wouldn't be necessary, just a check to see if "stop_service" exists anywhere in the dhcpd startup script and if it doesn't, insert it at the end. | </syntaxhighlight>The ''ln'' command corrects the symbolic link issue mentioned above. And the ''rm'' command corrects the PID file issue that never goes away, again mentioned above. Also note that if the DHCPD package is ever updated, the script will need to be modified again. A startup script could be written, but haven't had time to write that yet. This post gives a fairly goot hint on how to write it: https://askubuntu.com/questions/77149/how-to-find-text-and-replace-that-line-if-exists-with-terminal-otherwise-just-ap Although regular expressions wouldn't be necessary, just a check to see if "stop_service" exists anywhere in the dhcpd startup script and if it doesn't, insert it at the end. | ||