LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   text mode progress bar on boot (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/text-mode-progress-bar-on-boot-169912/)

iluvatar 04-14-2004 02:40 AM

text mode progress bar on boot
 
Hello Everybody!

I like playing with linux :) now finally I've got a successtory too... after I read the Bash-prompt-HOWTO (check my signature) I knew it is possible to do some nice things with just simple echo commands too, like printing colorfull text on custom places on screen. Then I decided to implement this in my bootscripts of my fresh Linux From Scratch install to create a text mode progress bar on boot. After messing up my bootscripts many times, I did it! I added some code in the main runlevel script (/etc/rc.d/init.d/rc) wich counts the number of scripts to execute in the new runlevel, after wich it calculates the step with wich the progressbar would advance after each script. From within the rc script, all other scripts are called, so after each script call, I execute a function wich updates the progress bar. I added the function to the general functions file (/etc/rc.d/init.d/functions). This function clears the top three lines, print a border, the runlevel wich is entered, and the progress bar within the border :) However I'm not completely finished yet. Some processes wich are started generate too much output so the screen will scroll wich scrolls the progress bar out of sight, and it gets visible again after the script completes. I'm planning to reduce the ouput to just <scriptname> with (OK) or (FAILURE), wich is cleaner to look at anyway. I will also implement a bootlog wich contains all info, but that's for later on, since I know everything runs smoothly now :p If someone is interrested I can upload the modifications I made to the scripts so far, however I do not currently have access to the LFS laptop, so that will be tomorrow than... or I can rewrite them from what I remeber of last night, but I think this will render your system useless ;)

Greetz,
-= iluvatar =-

iluvatar 04-14-2004 09:30 AM

ok, I'm writing a howto on this... interrested? I don't have any webspace to upload it but if you want to help me with testing / developing, feel free to PM me for more info :)

greetz,
.-=~ iluvatar ~=-.

iluvatar 04-15-2004 02:01 AM

And I finished it :) The progress bar shows up as soon as INIT is called by the kernel when booting. It shows the total progress per runlevel, the runlevel starting, the script loading at the moment and in case there is any, it prints the script output. After each script, the screen gets cleared to start the next script. This makes sure the text won't scroll wich will scrolls the progressbar out of sight... BUT: I looked at the boot scripts of SuSE 9.0, and I noticed those are much more complex :p I guess this counts for other distro's too... If you want to try this at home, feel free to email me: eric at cdls dot nl.

Greetz,
.-=~ iluvatar ~=-.

AeSix 05-12-2004 02:52 PM

Try SourceForge or Freshmeat for space

I think they both offer free space for spall projects with low bandwidth

or at the least... google/geocities/ ad what not have free space....

I'd be very interested in seeing this, tho I'm not to the point of messing with raw script commands like tht yet (stuck in KDE land for now)

Solean 05-24-2004 07:54 PM

Sorry for bumping this if it's way on the bottom (though hopefully unlikely) but I really think this is a cool little project. If I can help in anyway, email me at jeff@ummu.org.

Bamse123 05-26-2004 06:42 AM

Whoa cool. I would like to see that.

Regards,
Bamse

JohnCain 05-04-2006 03:48 AM

OK its some years later but I am interested in what you have done. Is there a
copy of the code for your improvements available anywhere??


All times are GMT -5. The time now is 06:54 AM.