These commits introduce a socket-activated systemd service. This service acts as a proxy for commands to the USB-SD-Mux. Using the proxy enables non-root users to control the USB-SD-Mux from their context.
A socket-activated service is used to reduce load on systems where the USB-SD-Mux is only used sporadically.
The command line interface of the usbsdmuxtool is left unchanged as far as possible:
Using it in the old syntax still enables a user to use it with root-privileges.
Adding a -c enables client-mode and used the default socket-location.
Adding a -s /path/to/socket enables client-mode with the specified socket.
Communication over the socket is done JSON-encoded.
These commits introduce a socket-activated systemd service. This service acts as a proxy for commands to the USB-SD-Mux. Using the proxy enables non-root users to control the USB-SD-Mux from their context.
A socket-activated service is used to reduce load on systems where the USB-SD-Mux is only used sporadically.
The command line interface of the
usbsdmux
tool is left unchanged as far as possible:-c
enables client-mode and used the default socket-location.-s /path/to/socket
enables client-mode with the specified socket.Communication over the socket is done JSON-encoded.