Results 1 to 3 of 3

Thread: Identifying when embedded Linxu really is up

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Identifying when embedded Linxu really is up

    All,

    I don't normally go messing around with bootstrap code or any other such thing, but it appears those who put the BitBake BusyBox build together for this project aren't really around anymore. I absolutely know what is wrong though I'm just now starting to look at it. There were two idiots.

    The first is/was the systems team/person/people who are launching stuff at startup rather willy-nilly then dropping straight into launching the application without including any mechanism what-so-ever of determining if basic services like Alsa and Telnet have actually completed. What is the simplest method of determining if Alsa and Telnet (for now) have completed startup? I mean simplest way from inside one of these init.d type scripts. Keep in mind I try to avoid any and all type of involvement with linux scripting, so make no claims to knowledge or skills in it. (If it was something robus like DCL, I could hack out a beautiful 5K line script in an afternoon without problem. Not so much with this stuff.)

    While poking around for this answer I will begin fixing the code of the second idiot who assumed the OS would always be there and didn't check any return values thus causing the application to crash periodically on cold boot because either the sound didn't get started or, more often, the network didn't complete configuring itself before the app tried to use it full throttle.

    Thanks,

  2. #2
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Identifying when embedded Linxu really is up

    Never mind, I figured it out. After reading through each of the scripts in /etc/init.d I found most were making sure a volital /tmp directory was writeable. Just modified each of the "required' items to write a one line file to that directory. The application startup script then checks the contents of each file in a loop until it finds the values it wants or has tried too many times. Yes, I stuck a sleep in too.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Identifying when embedded Linxu really is up

    Quote Originally Posted by RolandHughes View Post
    All,

    I don't normally go messing around with bootstrap code or any other such thing, but it appears those who put the BitBake BusyBox build together for this project aren't really around anymore. I absolutely know what is wrong though I'm just now starting to look at it. There were two idiots.

    The first is/was the systems team/person/people who are launching stuff at startup rather willy-nilly then dropping straight into launching the application without including any mechanism what-so-ever of determining if basic services like Alsa and Telnet have actually completed. What is the simplest method of determining if Alsa and Telnet (for now) have completed startup? I mean simplest way from inside one of these init.d type scripts. Keep in mind I try to avoid any and all type of involvement with linux scripting, so make no claims to knowledge or skills in it. (If it was something robus like DCL, I could hack out a beautiful 5K line script in an afternoon without problem. Not so much with this stuff.)

    While poking around for this answer I will begin fixing the code of the second idiot who assumed the OS would always be there and didn't check any return values thus causing the application to crash periodically on cold boot because either the sound didn't get started or, more often, the network didn't complete configuring itself before the app tried to use it full throttle.

    Thanks,
    Usually services started with init scripts create a file with their name in /var/run or similar (/run, /var/spool/run) containing their pid. You can check that directory for what you need. Alternatively running "service servicename status" should return the status of a service (usually based on that pid file in /var/run). For completeness I have to say that the original u*ix way of ordering startup scripts is via /etc/rc?.d/* and that's where you should probably start.

    I really don't like your idea of creating files in /tmp. That directory is to be used in some other manner.

    Not that this question has anything to do with Qt...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Identifying Mouse Moved in contextMenuEvent
    By mqt in forum Qt Programming
    Replies: 0
    Last Post: 2nd May 2014, 14:05
  2. Identifying which QAction was toogled in a simple way
    By Momergil in forum Qt Programming
    Replies: 4
    Last Post: 28th January 2014, 23:34
  3. Identifying signal emitter
    By alan lenton in forum Qt Programming
    Replies: 4
    Last Post: 7th October 2009, 17:16
  4. Identifying QThreads
    By TheGrimace in forum Newbie
    Replies: 2
    Last Post: 18th March 2008, 16:39
  5. Identifying file when filename is not enough
    By drhex in forum Qt Programming
    Replies: 4
    Last Post: 9th November 2006, 20:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.