Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Jul 2015, 02:37
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Announcements
Bugfix: rc.network in Puppy 2.14 through 2.17.1
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 04 Jun 2005
Posts: 1094
Location: Sweden

PostPosted: Sat 25 Aug 2007, 09:10    Post_subject:  Bugfix: rc.network in Puppy 2.14 through 2.17.1
Sub_title: The ifplugstatus loop delay did not work

I've found a bug in rc.network that may help explain why the ifplugstatus function has been unreliable ever since execution of rc.network was put into the background in Puppy 2.14, ie, executed as a separate process from rc.local0.

The problem lies in line 114 (Puppy 2.17.1):

read -t ${TRY_DELAY} a

This command does not work correctly when rc.network is run in the background. The line does not produce a delay. I've tested this by monitoring the loop to a temp file with the 'date' command and the number of iterations.

I commented-out line 114 and the following line, as interrupting the loop when run in the background with "Enter" makes no sense, and added this line:

sleep ${TRY_DELAY}

So the complete patch looks like this:

    if [ "`ifplugstatus${IFVER} ${INTERFACE} | grep "link beat detected"`" = "" ]; then
     #read -t ${TRY_DELAY} a
     #[ $? -eq 0 ] && TRY_COUNT=${TRY_MAX_COUNT}
     #pakt: 'read -t <delay>' doesn't work when rc.network is run as a separate process
     sleep ${TRY_DELAY} #use this instead

Original code from Puppy 2.17.1:

    if [ "`ifplugstatus${IFVER} ${INTERFACE} | grep "link beat detected"`" = "" ]; then
     read -t ${TRY_DELAY} a
     [ $? -eq 0 ] && TRY_COUNT=${TRY_MAX_COUNT}

Previously, on an Acer with the wireless interface set up, rc.network did not start the interface since the link beat took 2.5 sec to start. It now works at every boot Smile

Puppy unofficial tester (off and on) since v0.9.2
Back to top
View user's profile Send_private_message 
Puppy Master

Joined: 09 May 2005
Posts: 7441
Location: Perth, Western Australia

PostPosted: Sat 25 Aug 2007, 20:17    Post_subject:  

Thanks for the info, I'll implement the fix.
Back to top
View user's profile Send_private_message Visit_website 

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Tue 11 Sep 2007, 17:59    Post_subject:  

Hi; will this fix initiate eth1 (wireless in my case) if eth0 (wired) is unplugged? If so it's just what I've been looking for.

I have found that Puppy remembers and then only tries to initialise the first network interface you configure. Should you ever switch to the alternative the network wizard has to be re-run every time.

If it doesn't do that now but could be made to then what would have to be changed to add that functionality?

Back to top
View user's profile Send_private_message 

Joined: 25 Dec 2006
Posts: 21

PostPosted: Wed 12 Sep 2007, 09:31    Post_subject: Could this fix my bootup hang?  

I have been running puppy 2.17 with the network wizard and dhcp upgrades. I did the upgrades trying to get around the following problem:

I use a belkin usb wireless device to connect to the internet. If I leave it plugged in to my USB hub (or maybe if I leave it plugged in period) during bootup, the machine won't boot up. It hangs at the "looking for networks..." line. (Can't remember the exact message but it's where it waits for the DHCP connection.) If I unplug the usb wireless device, so that I have exactly zero network devices, the machine boots up fine. I then plug in my usb device, configure using the new network wizard and everything works flawlessly.

The little bit of investigation I did showed that the timer loop never timed out, which seems to relate directly to this bug.

I guess the thing to do is download the new script and give it a try, which I will do. I just thought you guys might want to know that bootup hangs while trying to connect to the network have been a continuing problem. It was happening for the ethernet connection too, because I moved the computer to a location where there was only wireless but left the internet card in. I got around that by using the boot wizard to disable loading etho.

Like I said, I'll give new code a whirl and report back.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Taking the Puppy out for a walk » Announcements
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0546s ][ Queries: 12 (0.0042s) ][ GZIP on ]