[gobolinux-devel] Upstart (init replacement) working in gobolinux

Andrew Sampson adsmailinglists at yahoo.com
Sun May 13 22:17:42 UTC 2007


I've got upstart working in gobolinux.  I used the 0.3.8 version of upstart, and adapted the event.d scripts from frugalware.  (The example event.d scripts provided by upstart simply adapt the conventional sysV init stuff... which is useless when working in gobolinux, since gobolinux doesn't use sysV.)  The whole process was painless, and was finished in an afternoon.

The Good:
- My gobolinux 013 system starts up faster with upstart than the stock gobolinux BootScripts.
- Adding new services is easy.  I've tried a couple of different init replacements in the past (including initng) and upstart is by far the easiest to work with.
- The system has been quite stable, and I haven't observed any unexpected behavior.  I've had clean mounts and umounts every boot (which was my biggest complaint with the stock gobolinux BootScripts; see below).

The Bad:
- One thing that worries me about upstart is that, because it is event-based, a job can only be started when one of its triggering events is emitted (a logical OR).  InitNG, on the other hand, allows jobs to be started when any number of conditions have all been satisfied (a logical AND).  I haven't yet run into a situation where I need  a job to start only once several conditions have been satisfied, but I can imagine that this might be a problem for some users.  Worst case, a user could work around the problem by making the startup sequence more linear (eliminating some race condition, at the cost of losing some parallelism).
- Upstart needs more documentation.  Try as I might, I couldn't find documentation on the job file format.  I used the examples and the frugalware jobs as a guide.

I've tarred up the contents of my /Programs/Upstart/0.3.8 directory. You'll find it at http://dinosaur.no-ip.org/~andy/Upstart-0.3.8-gobo.tgz  I didn't attach it to this message because it's nearly 270k.  I'll take it down off the web server after a week or two.

Extract it to /Programs, and run "SymlinkProgram Upstart 0.3.8" to create the symlinks.  When compiling upstart, I used the following options:

"./configure --prefix=/Programs/Upstart/0.3.8 --sysconfdir=/System/Settings"

The sysconfdir option is the important one.  (I didn't use PrepareProgram or SandboxInstall, as I wasn't sure whether I would install upstart when I first started working on it.)

Some things that still need to be done:
- The splash screen is gone.  I don't use a splash screen anyway, so I'm probably not going to work on fixing that.
- The networking job still uses gobo's Network Task.  
- Hostname is set via /System/Settings/HOSTNAME, rather than /System/Settings/BootOptions.  Likewise, the console font is set through /System/Settings/sysconfig/font rather than /System/Settings/BootOptions.  If the gobo developers decide to switch to upstart, and want to keep /System/Settings/BootOptions, then the event.d jobs will need some work in order to grab their settings from that file.
- I didn't install upstart's replacement "reboot" or "shutdown" utilities, so my system doesn't currently have a working "reboot" or "shutdown" command.  I've been getting by by running "initctl emit runlevel 0" or just using the ctrl-alt-delete shortcut at the console.  This is reason enough for you to compile your own binaries, rather than using the ones in my tar file.

BTW - If you're curious as to why I would go to the effort to replace gobo's startup/shutdown scripts, here's why: 
- On my machine, the stock gobolinux startup and shutdown scripts often fail to fsck on startup, and fail to umount cleanly on shutdown.  (I'm using JFS, rather than ext3 or reiserfs, so that may have something to do with it, but I doubt it.)  
- The stock gobolinux startup system is brittle.  At one point, RemoveProgram added a bunch of garbage "unset" commands to my /System/Links/Environment/Cache, and it hosed my system.  I couldn't boot.  I spent over 4 hours just tracking down the problem.  Very very frustrating. (BTW - What purpose does /System/Links/Environment/Cache serve?  If it's so that newly-installed programs/packages can add new environmental variables, then there's more flexible and robust ways to handle that.  Take a look at /etc/profile.d on a fedora system if you want to know what I'm talking about.)

Thanks for the great distro.  Despite the gripes above, I really like gobo.  It fits my personality, and it *just makes sense*.

-Andrew Sampson



 
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gobolinux.org/pipermail/gobolinux-devel/attachments/20070513/c91770c0/attachment.htm 


More information about the gobolinux-devel mailing list