[Splashy-users] splashy with a BSD like Init-System

Luis lemsx1 at gmail.com
Mon Jan 1 21:44:24 CET 2007


(forwarded copy to splashy-users for archival purposes)

On 12/29/06, Hannes Mayer <kontakt at ecarux.de> wrote:
> Thank you for the fast answer.
>
> Hm,
> I have written a start-script, and the splash itself works now fine for me
> but i have still some trouble with the progressbar.

The progressbar gets updated by sending a command to Splashy:
splashy_update 'progress N'

Where N is a number between 1 and 100.

Just do smaller scripts that send this command to Splashy if found running:

#!/bin/sh
# this script sends 10% to splashy
pidof splashy 2> /dev/null && splashy_update 'progress 10'

>
> At the Moment i am runnig splashy 0.2.1
> The init script creats me file in the /lib/splashy folder like this:
>
> net 14
> crond 28
> cups 42
> apache 57
> postgresql 71
> vmware 85
> splashy 100
>
> The file is called /lib/splashy/2-progress.
> (Runlevel 2 is the highest Level on my System)
>
> Looks this right?

Yes, that looks right. If you want to do things like this, then you
would need to write a function to read this file from every initrc
script that you run. Say that your vmware script calls a function
called "start" when vmware is doing whatever it needs to prepare the
system for itself. In the case of Linux, "start" uses functions that
are coming from the LSB suggested functions which are all defined in a
separate file under /lib/lsb/init-functions. This file just have
functions for sending status messages to the screen once a script is
running. This file honors another script under
/etc/log-lsb-functions.sh, which allows functions to be overriden on a
per-system basis. That means that we can re-write the functions that
all scripts end-up calling, so that they can send splashy_update
command for us.

If this explanation is too confusing, just look under our SVN
"scripts" directory and pay attention to the "legacy" scripts under
the "tags" directory (any older version, like Splashy 0.2.1 would do).

http://svn.debian.org/wsvn/splashy/trunk/scripts/?rev=0&sc=0

> How did splashy do the progress?
> Is splashy reading this files in /lib/splashy?
>
> You can ignore the splashy entrie at the end of the file.
> It only stops splashy for me, cause at the moment it doesn't stop when the
> x server startsup, but thats not the Problem.
> I start splashy so early as possible, after udev in the /etc/rc script.
>
>
> I hope that you can understand my qustion and it is not a
> problem of my bad english.
>
> Thank you
> Hannes
>
>
>
> Am Donnerstag 28 Dezember 2006 21:20 schrieben Sie:
> > Hello Hannes,
> >
> > This is the reason why we kept the older scripts around (inside the
> > legacy folder in svn).
> >
> > Your best bet I guess is to use the splashy10 splashyZ kinda scripts.
> > They work by running scripts at pre-chosen points during the boot
> > process. For instance, in the case of sysV style boot:
> >
> > while booting:
> > /etc/rcS.d/S01splashy <--- starts splashy
> > /etc/rcS.d/S10splashy10 <--- 10%
> > /etc/rcS.d/S...splashy... <--- other percents up to a number, say 70
> > /etc/rc2.d/S99splashyZ <-- stops splashy
> >
> > when shutting down:
> >
> > /etc/rc2.d/K01splashyZ <--- when script gets "stop" it starts splashy
> > with "shutdown" as argument
> > ... other scripts send percentage increments to Splashy using
> > splashy_update...
> >
> > Please note that we have no updated the legacy scripts in a while.
> > They might need to be revised.
> >
> > Now, splashy-init was done specifically for Debian. Testing and making
> > splashy-init work with any other OS, even variants of Linux, might be
> > a bit complicated. In fact, for Linux use, splashy-init has been
> > deprecated by us ;-) the LSB approach works better.
> > That said, to make splashy-init work, you will need to have a few
> > tools in place, the most important of which are:
> >
> > /proc filesystem
> > some form of pgrep implementation
> > all directories mounted before splashy starts (splashy-init will wait
> > for /proc to be mounted)
> > and others that you can read through the splashy-init code.
> >
> > splashy-init is a very ingenious script. but it's also very
> > complicated. if possible, use the splashy10 scripts.
> >
> > On 12/27/06, Hannes Mayer <kontakt at ecarux.de> wrote:
> > > Hi,
> > >
> > > i have build a Crux port of splashy and it works (after some trouble) but
> > > there are also some problems with the init script.
> > > i am still using the splashy-init script from 0.1.8 because the newer
> > > doesn't work without LSB init-functions. With the old script splashy
> > > starts up, but there is still some trouble with the Runlevels.
> > > Are there some Ideas for an init script for BSD like Init system (maybe
> > > it is interesting for slackware too)?
> > >
> > > Thank You.
> > > Hannes
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Splashy-users mailing list
> > > Splashy-users at lists.alioth.debian.org
> > > http://lists.alioth.debian.org/mailman/listinfo/splashy-users
>
> --
> Hannes Mayer
> ecarux Computer-Service
>
> Cuxhavener Straße 266
> 21149 Hamburg
>
> Tel.: 040 / 98235882
> mail: kontakt at ecarux.de
> Homepage: ecarux.de
>
> Steuernummer: 06/276/WVL
>
>
>
>


-- 
----)(-----
Luis Mondesi
*NIX Guru

"Feliz el hombre que ha hallado sabiduria y el hombre que consigue
discernimiento, porque el tenerla como ganancia es mejor que tener la
plata como ganancia; y el tenerla como producto, [mejor] que el oro
mismo" (Prov 3:13-14).


More information about the Splashy-users mailing list