blob: 387c95d9f05ccfe78333f1b7290d9d85a49ba484 [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For an ipp-over-usb device, set the group permissions so that it can
# be accessed by libusb without having to run as. Then start the ipp-usb
# bridge.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
ACTION=="add", \
ENV{ID_USB_INTERFACES}=="*:070104:*", OWNER="root", GROUP="ippusb", \
MODE="0660", RUN+="/usr/libexec/ippusb/bridge_start"
# ippusb_bridge will shut itself down when the USB device is removed, but we
# also want to tell upstart to stop tracking the job. Otherwise it will try to
# respawn ippusb_bridge several times before giving up.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
ACTION=="remove", ENV{ID_USB_INTERFACES}=="*:070104:*", \
RUN+="/usr/libexec/ippusb/bridge_stop"