[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scripting DBus services

On 01/22/2013 10:32 PM, Neil Williams wrote:
> On Tue, 22 Jan 2013 15:05:58 +0100
> Josselin Mouette <joss@debian.org> wrote:
>> Le mardi 22 janvier 2013 à 14:57 +0100, Svante Signell a écrit : 
>>> Worthwhile to read, definitely.
>> Yet full of misinformation, like the idea that using D-Bus makes a
>> service less scriptable (while the reality is a complete opposite), or
>> that configuration files are less human-readable than shell scripts.
> Hmm, scripts written in certain languages may have simple DBus
> interfaces but it's by no means trivial to do asynchronous DBus
> operations in a shell script. dbus-send does immediate calls but if
> something is going to take longer than the usual DBus timeout,
> responding to a DBus signal requires something other than shell.
> So, depending on what needs to be accomplished and how long it is going
> to take, DBus does make services less scriptable simply because DBus
> just won't sit there and wait (and block) for hours. Within what DBus
> is meant to do, that's expected and correct. It just means that there
> is more work involved than simply waiting for /usr/sbin/foo to return
> in a single line shell script.
> Even with dbus-send, what may have been a 30 character one-line call in
> shell becomes a 120 character complex call with quoting issues and
> return-type-unmangling.
> It depends on the meaning of "scriptable" - with the strict meaning of
> the kind of shell scripts to which sysadmins have become familiar, then
> DBus really isn't scriptable except for v.simple operations. 


I know very few about dbus. Could you quote/show/link to examples
of what you are saying?



Reply to: