daemon default consistancy
Carl Karsten
carl at personnelware.com
Tue Apr 5 15:58:11 CDT 2005
Matt Zimmerman wrote:
> Please don't CC me.
>
> On Tue, Apr 05, 2005 at 02:43:53PM -0500, Carl Karsten wrote:
>
>
>>Do you realize there is a bunch of stuff below that will never be executed?
>>
>>My guess is this script was meant for when it run as a daemon, and yet
>>as it stands it will never run, regardless of the
>>config $RUN_DAEMON" = "yes" setting.
>
>
> It sounds like you're misreading the script; the && and || operators have
> equal precedence, and are processed left to right.
>
root at sahara:~/temp # cat test.sh
#! /bin/bash +x
test "X" = "Y" || echo "X is not Y" && echo "and we exit 0"
test "X" = "X" || echo "X is not X" && echo "and we exit 0"
root at sahara:~/temp # ./test.sh
X is not Y
and we exit 0
and we exit 0
So either way, we exit 0.
Carl K
More information about the ubuntu-devel
mailing list