Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: lovelypp on March 21, 2023, 08:28:09 PM

Title: how to disable udhcpc (/etc/init.d/dhcp.sh) ?
Post by: lovelypp on March 21, 2023, 08:28:09 PM
I want to use static ip when bootup.  but when bootup, it always get a dynamic ip.
thanks!
Title: Re: how to disable udhcpc (/etc/init.d/dhcp.sh) ?
Post by: GNUser on March 21, 2023, 08:44:45 PM
The nodhcp boot code does just that.

You'll probably have to write a script or add a boot time command to bootlocal.sh to set your static ip.

Title: Re: how to disable udhcpc (/etc/init.d/dhcp.sh) ?
Post by: Rich on March 21, 2023, 09:52:11 PM
Hi lovelypp
I have the attached script in my  /opt  directory. I call it
from  /opt/bootlocal.sh  like this:
Code: [Select]
/opt/eth0.sh
The  pkill udhcpc  line disables  dhcp.
Adjust the  nameserver  lines to point where you want your DNS look-ups to be handled.

Title: Re: how to disable udhcpc (/etc/init.d/dhcp.sh) ?
Post by: lovelypp on March 27, 2023, 06:22:11 AM
thanks.
I use the nodhcp bootcode and it solved.