From: Friedrich L. <fl...@fl...> - 2003-03-22 14:46:30
|
Hi! Just found out that at the moment there's no way to pass additonal options to the dhcp client (dhcpcd). As I don't want to let someone from the outside change my dns or ntp settings I had to pass it the options "-R" and "-N". From "man dhcpcd": -R Prevents dhcpcd from replacing existing /etc/resolv.conf file. -N Prevents dhcpcd from replacing existing /etc/ntp.conf file. others might need: -G Prevents dhcpcd from setting a route to the default gateway. This is useful when multiple processes of dhcpcd are running and you want to control which one is allowed to set the default route. -S Keep the searchlist from an existing resolv.conf when replacing the file. dhcpcd will add it to the domainname received from the DHCP server. -c <ExecFilePath> dhcpcd will try to execute <ExecFilePath> script instead of default <ConfigDir>/dhcpcd.exe script every time it configures or brings down the interface. See the description of dhcpcd.exe script in FILES section below. I used DL 0.5 but copied the /etc/init.d/network script from 0.6pre and patched it (Patch below). I won't check this into the current Devil build tree as I'm currently not sure to solve this globally. Should this be in etc/sysconfig/nic/ifcfg-ethX or better in etc/sysconfig/config? Comments please! --- network-org 2003-03-22 15:40:02.000000000 +0100 +++ network 2003-03-22 14:59:39.000000000 +0100 @@ -36,6 +36,7 @@ source /etc/sysconfig/config DHCPCD="/usr/sbin/dhcpcd" +DHCPCD_OPTS="-R -N" case "$1" in start) @@ -83,7 +84,7 @@ mkdir /etc/dhcpc fi echo "Starting DHCP on interface $DEVICE..." - loadproc $DHCPCD -d $DEVICE + loadproc $DHCPCD $DHCPCD_OPTS -d $DEVICE else BCAST="" if [ -n "$BROADCAST" ]; then -- MfG / Regards Friedrich Lobenstock ____________________________________________________________________ Friedrich Lobenstock FL226-RIPE Internetservices URL: http://www.fl.priv.at/ Email: fl...@fl... ____________________________________________________________________ |