multiple instances of the same script?
Scott James Remnant
scott at netsplit.com
Sat Mar 10 19:57:58 GMT 2007
On Sat, 2007-03-10 at 19:35 +0100, paul wrote:
> This is an elegant solution. What I was thinking of the following ( I
> deal with root separately):
>
> emit fs-checked "$partition"
>
This will block until the filesystem has been checked, as well as output
any status information. If you don't want that, use --no-wait and
--quiet respectively.
I've been thinking of another solution to the "only check one partition
of a disk at a time" problem, that also happens to solve other
problems...
Resources.
----------
Simply put, a resource is an arbitrary string name with a double value
that can be consumed by jobs.
Jobs would declare which resources they consume, and how much of that
resource they consume, in their job definition: e.g.
uses cpu 0.5
Upstart would not immediately start a job if it causes the current
combined consumption of that resource to be greater than 1.0, and delay
it until the resource has been freed up a little.
Configuration would also allow the increasing of the availability of
that resource from 1.0 to a higher value, for example a dual-processor
machine might have 2.0 cpu available.
We could allow the resource name to be expanded from information in the
event (I've been thinking this would be useful in a couple of other
circumstances as well), so you could define something like this
(assuming we have a $DISKNAME variable in the event):
start on block-device-added
uses $DISKNAME
exec /sbin/fsck "$DEVNAME"
post-stop exec emit fs-checked "$DEVNAME"
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20070310/48569631/attachment.pgp
More information about the upstart-devel
mailing list