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 30 Jul 2014, 03:13
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 [4 Posts]  
Author Message
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 25 Aug 2007, 09:10    Post subject:  Bugfix: rc.network in Puppy 2.14 through 2.17.1
Subject description: 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):

Code:
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:

Code:
sleep ${TRY_DELAY}


So the complete patch looks like this:
Code:

    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
    else
     UNPLUGGED='false'
     TRY_COUNT=${TRY_MAX_COUNT}
    fi


Original code from Puppy 2.17.1:
Code:

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


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

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
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 poster's website 
nic2109

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?

Nick
Back to top
View user's profile Send private message 
swarnick

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 from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
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 post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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