RE: DHCP small problem
On 16-May-99 jean-Yves BARBIER wrote:
> Hi,
>
> I'm running under 2.2.7 kernel, using DHCP with my cable modem. Each time I
> forgot to remove the 'dhcp-client' file in
> /var/db, at reboot dhcp is very very slow and often can't get me my IP
> adresse.
> How can I automatically remove this file at the shutdown?
> (beeing with Linux for less than a month, so I don't know how to program bash
> yet)
> JY
Short term solution:
place a file called clean_dhcp in /etc/init.d. chmod +x said file
<<BEGIN>>
#!/bin/sh
if [ -f /var/db/dhcp-client ]
then
echo "Cleaning old old dhcp information"
rm -f /var/db/dhcp-client
fi
<<END>>
then cd /etc/rcS.d and make a symlink to the clean_dhcp script named
'S60clean_dhcp'. The name ensures it is run last in that section.
The above script test if the file exists (-f) and if so run echo and rm. if I
have the file placement wrong, feel free to change the path.
Long term:
Contact the dhcp client maint and have this problem looked into as one should
not have to remove this file.
Reply to: