Code review comment for lp:~jamesodhunt/upstart/bug-881885

Revision history for this message
Colin Watson (cjwatson) wrote :

I know this is a bash script, but even in bash scripts I would prefer that we always used the form "[ test ] && [ test ]" rather than "[ test -a test ]"; it's more portable in case somebody wants to convert it to portable /bin/sh later, and the parsing rules are so much clearer.

I'd suggest a slightly simpler approach rather than having to manually kill dbus-launch: move the dbus-launch call as far up the script as is practical, and have the script re-exec itself under dbus-launch (i.e. 'exec dbus-launch "$0" "$@"' or similar). dbus-launch will then automatically exit when the script finishes, and the net result should be much less code.

review: Needs Fixing

« Back to merge proposal