[Fuego] [PATCH] Add support for full device paths (with slashes and colons) to sercp

Frank Rowand frowand.list at gmail.com
Thu Apr 13 21:06:59 UTC 2017


On 04/13/17 11:48, Bird, Timothy wrote:
>> -----Original Message-----
>> From: Bird, Timothy on Thursday, April 13, 2017 11:36 AM
> 
> Just some commentary on the patch...
> 
> This patch solves the problem we were discussing earlier.
> With the feature, I can do any of the following, which are all equivalent:
> $ sercp foo ttyACM1:/tmp
> $ sercp -d /dev/ttyACM1 foo serial:/tmp
> $ sercp -d /dev/serial/by-path/pci-0000:08:00.0-usb-0:3:1.4 foo serial:/tmp
> All of these copy file 'foo' to the host at the other end of the serial port.
> 
> You can use 'serial' as the placeholder for the device path in either the source
> or destination file arguments.  So this works also:
> $ sercp -d /dev/serial/by-path/pci-0000:08:00.0-usb-0:3:1.4  serial:/tmp/foo bar
> (copy the file 'foo' from the remove host back to the local filesystem, as 'bar').
> 
> Let me know what you think.

I like it.


> BTW - what's up with the unused "user@" parameters?  Why are those supported?
> Fuego does not need them or use them.  Was there some plan to use them in the future?

The intent was to allow a drop in replacement for scp and ssh, with the only change
to the command being that a serial device name replaces the host name.  So having
a "user@" would not result in an error.

At the moment the user name is just ignored.  The user name could possibly be used
in the future:

  sercp
     -- If user specified for the target, try to 'chown user' after copying
     -- If user specified for the source, try to 'su user' before reading
        the file.  This is likely to fail due to passwords.

  sersh
     -- If user specified, try to 'su user' to execute the command as user.
        This is likely to fail due to passwords.

It seems like the 'chown user' might be a good idea, but the other changes
look like feature creep to me.


> 
>  -- Tim
> 



More information about the Fuego mailing list