[Splashy-devel] Bug#473112: Bug#473112: splashy: breaks udev - log_daemon_msg does not play well with -e switch from udev script

John Hughes john at Calva.COM
Sat Mar 29 10:35:44 UTC 2008


Alban Browaeys wrote:
> On ven, 2008-03-28 at 15:58 +0100, John Hughes wrote:
>
>   
>> But doing some tests it looks like most (all?) shells don't treat a
>> command that contains && as an error:
>>     
> [...]
> So basically I agree && does not trigger an error . What I found out is
> that inside a function the behaviour changes :
>
> So my patch seems needed to get things working as lsb-base-logging.sh
> make the list of calls in functions.
>   
Aha!  you are completely correct - the function call returns the return 
status of the last command, so if the last command failed the function 
call is considered to have failed, and so when -e is in force the script 
is aborted.

Shell scripting makes my head hurt.






More information about the Splashy-devel mailing list