created a file in here which i called "dhcpd-extras.conf" and added the extra options i wanted for the dhcp server. use the same tags as you can see in the /etc/dhcpd/dhcpd.conf file, which should be like "dhcp-option=tag:eth00,option:tftp-server-name,192.168.0.12" unless you have some exotic setup.
编辑 /etc/rc.network
find the part that looks like:if [ "${CONF_LIST}" = "" ]; then
return 1;
fi
在其后加入以下代码:
local CONF_EXTRAS="/path/dhcpd-extras.conf"
if [ -e ${CONF_EXTRAS} ]; then
CONF_LIST="${CONF_LIST} ${CONF_EXTRAS}"
fi
保存后退出
重启DSM
just remember to add the changes to the rc.network file each time you update the disk station firmware/os
内容修改后:
if [ "${CONF_LIST}" = "" ]; then
return 1;
fi
####################################################################################
local CONF_EXTRAS="/etc/dhcpd/dhcpd-extras.conf"
if [ -e ${CONF_EXTRAS} ]; then
CONF_LIST="${CONF_LIST} ${CONF_EXTRAS}"
fi
######################################################################################
DNS_INFO_FILE="/etc/dhcpd/dhcpd-dns-dns.info"
DNS_CONF_FILE="/etc/dhcpd/dhcpd-dns-dns.conf"
isEnable=`/bin/get_key_value ${DNS_INFO_FILE} enable`
if [ "x${isEnable}" = "xyes" ] && [ -f ${DNS_CONF_FILE} ]; then
CONF_LIST="${CONF_LIST} ${DNS_CONF_FILE}"
fi
没有评论:
发表评论