On Mon, Oct 27, 2008 at 3:40 AM, Scott James Remnant <[EMAIL PROTECTED]> wrote:
> On Sun, 2008-10-26 at 20:36 -0700, Garrett Cooper wrote:
>
>> [10:~]$ cat /etc/init/jobs.d/umasktest_doesntwork
>> umask 777
>>
>> pre-start exec "[ -f /umask_test ] && rm -f /umask_test"
>>
> Why do you have quotes around this?
>
> This will be passed to the shell as the name of a binary to be exec'd
> (so will look for something like
>
>        "/usr/bin/[ -f /umask_test ] && rm -f /umask_test"
>
> which is obviously an illegal filename because of the /s in it).
>
>
> Remove the quotes, and it should work:
>
>        pre-start exec [ -f /umask_test ] && rm -f /umask_test
>
> This is identical to:
>
>        pre-start script
>                exec [ -f /umask_test ] && rm -f /umask_test
>        end script
>
> Scott

Ah, I left the quotes there by accident trying to test out a set of
solutions to see whether or not I could pinpoint the issue.

The issue still persists, which makes me thing that upstart is
evaluating the test statement as a failure and as such pre-start fails
and in the end takes down the rest of the job lifecycle. Is that in
fact the case?

Thanks,
-Garrett

[PEXPECT]# initctl start /etc/init/jobs.d/umasktest_doesntwork
initctl: Unable to start job: Unknown job: /etc/init/jobs.d/umasktest_doesntwork

>From /var/log/messages:

Oct 27 17:39:06 10 <1225129146,135734>init: Connection from private client
Oct 27 17:39:14 10 <1225129154,23336>init: Connection from private client
Oct 27 17:39:14 10 <1225129154,80905>init: umasktest_doesntwork goal
changed from stop to start
Oct 27 17:39:14 10 <1225129154,82870>init: umasktest_doesntwork state
changed from waiting to starting
Oct 27 17:39:14 10 <1225129154,86163>init: Handling starting event
Oct 27 17:39:14 10 <1225129154,90711>init: umasktest_doesntwork state
changed from starting to pre-start
Oct 27 17:39:14 10 <1225129154,134644>init: umasktest_doesntwork
pre-start process (9538)
Oct 27 17:39:14 10 <1225129154,416482>init: umasktest_doesntwork
pre-start process (9538) terminated with status 1
Oct 27 17:39:14 10 <1225129154,419602>init: umasktest_doesntwork goal
changed from start to stop
Oct 27 17:39:14 10 <1225129154,420088>init: umasktest_doesntwork state
changed from pre-start to stopping
Oct 27 17:39:14 10 <1225129154,421219>init: Handling stopping event
Oct 27 17:39:14 10 <1225129154,422169>init: umasktest_doesntwork state
changed from stopping to killed
Oct 27 17:39:14 10 <1225129154,422417>init: umasktest_doesntwork state
changed from killed to post-stop
Oct 27 17:39:14 10 <1225129154,422661>init: umasktest_doesntwork state
changed from post-stop to waiting

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to