[kwlug-disc] What is all this about systemd?

Chris Irwin chris at chrisirwin.ca
Fri Jul 18 02:18:04 EDT 2014


On 07/17/2014 09:55 PM, Jason Locklin wrote:
> On Thu, Jul 17, 2014 at 9:26 PM, unsolicited <unsolicited at swiz.ca 
> <mailto:unsolicited at swiz.ca>> wrote:
>
> >I can get why the desire to move away from text files - but I don't 
> get not building a command line interface as part and parcel of 
> developing any given API.
>
> I don't doubt there will be CLI interfaces; where there is a 
> well-documented API, there will be CLI programs that can interact with 
> them. They may even be scriptable. The difference, of course, is that 
> your scripts will consist of successive calls to these programs, using 
> whatever esoteric arguments and idiosyncrasies they require, rather 
> than interactions with text files in standard locations, using 
> standard shell commands. Of course "standard locations" and "standard 
> commands" have become scarce across the rapidly diverging 
> distributions anyway.

The example given in the original article, udisks2, doesn't directly 
make sense to have a user-facing CLI. You have a disk you want to mount 
manually on the command line? Use the already existing `mount` tools. 
They're simple and they work, and they are not going anywhere (hell, 
they're installed on android!)

You want to write a program that lists available disks, whether they're 
mounted, and optionally have support for mounting them (i.e., what 
nautilus does)? You sure as hell do not want to be parsing CLI output 
(You shouldn't even parse `ls`!). That's what the DBUS API is for.

If they made a /usr/bin/udisks2 that effectively re-implemented `mount`, 
they'd be called out for re-inventing the wheel with non-POSIX commands. 
Damned if you do...

-- 
Chris Irwin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140718/b3a5e7b8/attachment.htm>


More information about the kwlug-disc mailing list