Hi Knuth,

"K. Posern" <[EMAIL PROTECTED]> writes:

> Hi.
> 
> I really read a while! So I hope not to have overseen the answer for my question!
> 
> What about the RETURN CODES for cdrecord!?
>
> How do I know if the burn process was successfully finished?!

Well, that's actually not documented. Browsing through the code however
the intended behaviour is obviously

0 always on -v, --help and suchalike
!= 0 on error
0 on succesful write

as one may expect from a Unix tool.

> Do I have to parse the command-line output? What exactly do I have to search for - 
> I know that is a topic mentioned in the man page... but nevertheless:

Parsing the output of cdrecord would be a mess, wouldn't it? Especially because
being not documented in every detail it can change with each version...

> How do I recognize ANY KIND OF ERROR (message) which could occur during a burn 
> process <<< cause in your man page you only told about two kind of errors...

See above - just use the exit code.

However it may be that not all errors are detected by the drive and/or
cdrecord, so as I really want to be sure, that my backups are ok, I do
the following:

1. Burn the CD with cdrecord. Use -eject so the medium gets reloaded
   in the end (Important IMHO).

2. Mount the CD and diff with the source.

Optional: 3. Umount and eject it again so the operator gets reminded of
changing the medium ;-)

This way I:

- don't have to rely on any undocumented features of cdrecord

- can pipe all the noise from cdrecord to a logfile for debugging
  problems in case of failure so my cron jobs are quiet in case of
  success as they should be.

I also experienced that problems may vanish when retrying, especially
blanking rewritables, so my backup scripts repeats cdrecord actions a
few times before finally giving up.

Hope this helps, Matthias


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to