Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] init woes

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Hamish Greig <hgreig AT bigpond.net.au>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] init woes
  • Date: Thu, 09 Oct 2003 13:31:42 +1000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 9 Oct 2003 07:58, Seth Woolley wrote:
> I hope it wasn't moved into test yet. Oh well, do this to fix:
>

Sorry Seth I moved it into test( a few days/ a week ago) for testing as there
are some outstanding bugs in stable that devel/test fixes. I think this
highlights an issue we have been overlooking, we should have a 0 byte
NOT_INTEG file in any devel spell that shouldn't be integrated as it is WIP.
Hamish

> smgl_functions
> 89a90
>
> > export -f logger_func
>
> 132a134
>
> > export -f print_status
>
> or wait for the next tarballing.
>
> the reason why it prints success four times is because the init script was
> buggy to begin with. The new format only shows you how buggy the old
> script is because it doesn't line-up-print-status four times in a row
> which is unneeded status printing. I'm open to suggestions for a better
> way to print paralleled status. In parallel init, you can't just print
> [ OK ] on the same line due to the fact that you don't know what the OK
> was for if things can run in parallel.
>
> I suppose I could check for sequential init, but since the move up print
> status is also printing anyways, I don't see how it can be faster.
> Yes, prepending with 'init.d: ' may be overkill, so I removed that now,
> and scripts have color anyways, so you should know if it came from init.d.
>
> Now, it might be slower because of the system logger code (that was in
> there before though), but for good measure, I made it optional, so there's
> no fork needed for that.
>
> Perhaps success should be silent and only failures should be printed (but
> you wouldn't know if one script hung since you didn't not see success), or
> I could have it remember the last line printed for each script and have
> status go up the number of lines needed, print [ OK ] on the right
> side of it, then go back down a number of lines, but I would think that
> might be slower, even if it looks pretty.
>
> Another alternative is to have it print [ alsa: OK ] on the right
> side. The way I did it was quite simple, I thought, even though one may
> think it's not as pretty.
>
> The major gotcha so far is that echo used for anything other than printing
> to the screen needs to be "builtin echo" in init scripts since it occurs
> much more often as sent to the screen than as piped through another
> binary. When running sub-scripts, also, if one doesn't want the echo
> override to inherit, one needs to "(unset -f echo; subscript)" instead of
> running the subscript directly.
>
> Almost all standard init scripts work fine with it though.
>
> Hope that helps.
>
> Seth
>
> On Wed, 8 Oct 2003, Jeremy Kolb wrote:
> > So my xscreensaver decided to lock up my system (think it's the nvidia
> > drivers), and so I had to reboot. When I did, I noticed that the output
> > to the init stuff had changed. While I understand why the change was
> > made it looks kind of ugly to me. Also, it seems like everything takes
> > longer to load because more text is placed on the screen, and somethings
> > are displayed twice (samba has a "success" a total of four times) and
> > gdm comes up with about twenty of these: "line 10: printstatus not
> > found" or something like that.
> >
> > I understand that this was changed so that we could have services start
> > in parallel, but is there anyway we could have the old behavior stay for
> > the sequential init? Or modify what we have now as it's a little slower
> > and not as pretty?
> >
> > I'm just trying to think this through and I respect the work that's gone
> > into this (don't take this the wrong way!).
> >
> > Jeremy
> >
> > _______________________________________________
> > SM-Discuss mailing list
> > SM-Discuss AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/sm-discuss

- --
IRC nick: drmoriarty
SMGL co-conspirator
#Do You SMGL!?
# Linux so advanced it may as well be magic!
# http://www.sourcemage.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/hNae8fSufZR6424RAmOUAJ0Q/vTSe0FZbFa92sWxk0oNv6MxsQCfT0yl
HVWBO7TMIKl5uiAH5woQV50=
=LxHQ
-----END PGP SIGNATURE-----





Archive powered by MHonArc 2.6.24.

Top of Page