Making new init scripts?

William Uther willu.mailingLists at cse.unsw.edu.au
Sat Jan 23 10:30:11 GMT 2010


Hi all,

  I'm new here.  I hope I have the right place.

  Brief background: I was running zfs-fuse on intrepid with parts of /var on zfs.  This worked because I was able to start zfs just after all the other local filesystems were running, and before anything else started.  I've just upgraded to Karmic and everything is broken...

  As far as I can tell, my traditional init script is running far too late now.  I looked at making an upstart conf file to fix the problem, but I can't see an easy way to insert a new step into a previously defined graph of events.

  In this case, I'd really like to tell mountall not to emit local-filesystems or filesystem, but emit new events, "local-filesystems-foo" and "filesystem-foo".  I could then make a conf file that waited for those events, started zfs-fuse, then emitted "local-filesystems" etc.  But that approach doesn't seem to be possible.

  The next approach would be to make everything that listens for "local-filesystems" listen for something different, and then make my event listen for "local-filesystems" and then emit the new event when it is done.  This isn't as nice as the previous approach because a) I need to change more init scripts, and b) if I install something new which depends upon "local-filesystems" then it'll be broken until I fix it.  This is in contrast to the old sysvinit scripts which allowed me to just put the new script in the right location in the (linear) boot order.

  Is there an approach to this I'm missing?

  BTW, I found the documentation very hard to find.  The 'getting started' document is nice for getting started, but doesn't get you very far.  The most helpful document I found was the man page for init.conf here: http://launchpadlibrarian.net/28849150/init_conf.html but that doesn't seem to be installed by default on Karmic systems.  All that is installed by default is the manpage for init/upstart which is not very useful and doesn't mention the existence of the other page.

  Anyway, I think I'm just going to move more of /var off zfs and have zfs start later.

Be well,

Will      :-}




More information about the upstart-devel mailing list