WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Network card configuration  (Read 2675 times)

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Network card configuration
« on: August 26, 2013, 10:09:12 AM »
When we use the Network configuration gui in Tiny Core it always appends "/opt/eth0.sh &" to the end of "bootlocal.sh".
I was wondering why because I just realized that I have vsftp ,appache, telnetd and openssh all starting before the nic is configured. Could this be a problem? Because I started noticing some intermittent problems related to networking.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Network card configuration
« Reply #1 on: August 26, 2013, 12:05:46 PM »
Move "/opt/eth0.sh &" to the top of bootlocal.sh.
Follow it with:
SEC=60
while [ $SEC -gt 0 ] ; do
   ifconfig | grep -q "Bcast" && break || sleep 1
   echo -ne "Waiting for IP $((SEC--))  \r"     
done                                       
echo

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Network card configuration
« Reply #2 on: August 27, 2013, 05:12:09 AM »
Yes but here where I work we are putting TC on many industrial computer so we usually make an image of one when all is setup and then dd the image to the next one but here's the catch, we then may need to change the IP address. After doing that the line for 'eth0.sh' is back at the bottom. I know, don't use the 'Network' from control panel. But sometimes we need to make customer change it and asking them to edit a file and then do backup is not acceptable. Just out of curiosity if I was to move that line could I not move it to the beginning of bootsync.sh this would eliminate the need for a loop? Also, I have  openssh, vstfpd in bootsync.sh. Is this bad? Does the network card need to be properly configured before these servers start?
« Last Edit: August 27, 2013, 05:15:43 AM by mbertrand »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11230
Re: Network card configuration
« Reply #3 on: August 27, 2013, 08:05:47 AM »
Hi mbertrand
How about moving the loop and server start up commands to  /home/tc/X.d. Anything in that directory runs after
bootlocal and bootsync.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Network card configuration
« Reply #4 on: August 27, 2013, 09:54:34 AM »
I'm sorry I'm leading everyone on a goose hunt! I'll be more clear. I know this is a Linux specific question but this seems like the best place to ask. Does the network card need to be configured before any services that depend on it are started. I'm sure many TC users must have some sort of service requiring tcp and that these deamons start before card is configured (eth0.sh is executed).

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Network card configuration
« Reply #5 on: August 27, 2013, 10:05:44 AM »
I gave you the code to wait for the card to become active.  Use it.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Network card configuration
« Reply #6 on: August 27, 2013, 10:13:36 AM »
Ok thanks