On Thu, 21 Jul 2011 21:40:53 +0200, Daniel Kahn Gillmor 
<d...@fifthhorseman.net> wrote:
> when /var is full, "cereal-admin create" fails to work.  This is
> probably to be expected, but if this kind of failure happens, it
> should probably bail out earlier, and it should probably return a
> value other than 0.

Yes, this is definitely not right.

I can think of two ways to fix this:

- run the cereal-admin script with the sh -e option.  This would have
  caused the script to halt immediately when the initial mkdir failed,
  and return with the mkdir return code.

- explicitly check all the return of all the critical commands, such as
  particular the mkdir, but also any of the other commands that
  potentially write to /var.

The first option is certainly easiest.  I'm also partial to this method,
since I think scripts should always be run with -e (I know other feel
differently).

Any other idea or thoughts on the above appreciated.

jamie.

Attachment: pgpE6B1ARfYhD.pgp
Description: PGP signature

Reply via email to