Exit return values in hooks. 701 does not work in hook

Thomas Lange lange at informatik.uni-koeln.de
Mon May 13 18:09:22 CEST 2013


>>>>> On Wed, 8 May 2013 12:00:56 +0200, "Steven Wend" <swend at stud.hs-bremen.de> said:

    > I try to use the STOP_ON_ERROR value (it is 700) in a hook script. On an
    > error I decided to return the value 701 like "exit 701". But this is not
    > working for me.

    > I red the linux doc for bash scripts and it is said that only byte is used
    > to represent a returnvalue. So 700 might be an offerflow?!
Yes, in shell scripts the exit code must be between 0 and 255.
But in FAI we also use a for saving the error code, which can be set
to greater values than 255. Therefore call the subroutine task_error.

Example: task_error 888

-- 
regards Thomas


More information about the linux-fai mailing list