Potential issue with && shell operator and upstart command parsing

Garrett Cooper yanegomi at gmail.com
Mon Oct 27 03:36:11 GMT 2008


Hi Upstart folks,

      I think I may have found a potential issue with upstart 0.5.0
and how it parses shell-compatible boolean operators.

      Example:

[10:~]$ initctl start umasktest_doesntwork
initctl: Unable to start job: Job failed to start
[10:~]$ initctl start umasktest
[10:~]$

[10:~]$ cat /etc/init/jobs.d/umasktest
umask 777

pre-start script
   if [ -f /umask_test ]; then
        rm -f /umask_test
   fi
end script

exec touch /umask_test
[10:~]$ cat /etc/init/jobs.d/umasktest_doesntwork
umask 777

pre-start exec "[ -f /umask_test ] && rm -f /umask_test"

exec touch /umask_test

      Is this a known issue / limitation with job file parsing?

Thanks,
-Garrett



More information about the upstart-devel mailing list