diff --git a/pyproject.toml b/pyproject.toml index 7874d25..84c44c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ documentation="https://www.linux-automation.com/usbsdmux-M01/" [project.scripts] usbsdmux = "usbsdmux.__main__:main" usbsdmux-configure = "usbsdmux.usb2642eeprom:main" -usbsdmux-service = "usbsdmux.service:main" [tool.setuptools] packages = [ diff --git a/usbsdmux/__main__.py b/usbsdmux/__main__.py index a3ab5af..72dab41 100755 --- a/usbsdmux/__main__.py +++ b/usbsdmux/__main__.py @@ -54,26 +54,8 @@ def main(): subparsers.add_parser("info", help="Show information about the SD card") - # These arguments were previously used for the client/service - # based method to grant USB-SD-Mux access to non-root users. - # The client/service model is no longer needed due to new udev - # rules and a change to how the /dev/sg* devices are accessed. - # Display a warning but do not fail when these are used so - # existing scripts do not break and can be upgraded gracefully. - parser.add_argument("-d", "--direct", help=argparse.SUPPRESS, action="store_true", default=None) - parser.add_argument("-c", "--client", help=argparse.SUPPRESS, action="store_true", default=None) - parser.add_argument("-s", "--socket", help=argparse.SUPPRESS, default=None) - args = parser.parse_args() - if any(arg is not None for arg in (args.direct, args.client, args.socket)): - print( - "usbsdmux: usage of -s/-c/-d arguments is deprecated " - "as the service/client split is no longer required. " - "Please upgrade your scripts to not supply either of these arguments", - file=sys.stderr, - ) - config = Config(args.config) try: diff --git a/usbsdmux/service.py b/usbsdmux/service.py deleted file mode 100644 index 8357f1c..0000000 --- a/usbsdmux/service.py +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env python3 - -# SPDX-License-Identifier: LGPL-2.1-or-later - -# Copyright (C) 2021 Pengutronix, Leonard Göhrs -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -""" -This service was intended as systemd-socket-activated unit and provided an -interface to the USB-SD-Mux without the need for root privileges. - -Usage of this service became obsolete in new releases that changed the -way the /dev/sg* devices are accessed and that added new udev rules to -directly grant device access to the users. - -This file is kept here to notify users that have set up a systemd service. -""" - -import sys - - -def main(): - print("The usage of usbsdmux-service is deprecated.", file=sys.stderr) - print("Access to USB-SD-Mux devices is now controlled by a new set of udev rules.", file=sys.stderr) - print("Please delete/deactivate the service calling this command.", file=sys.stderr) - exit(-1)