Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:add-all-rules into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:vivid/master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 2fb814980f3f79a555c1cd9f85d129ce302b60cc
Merged at revision: 1cb5b61da0075028f109ea4f168f51fade1db27b
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:add-all-rules
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:vivid/master
Diff against target: 54 lines (+14/-7)
3 files modified
bin/modemmanager (+3/-6)
conf/77-mm-usb-device-blacklist.rules (+10/-0)
snapcraft.yaml (+1/-1)
Reviewer Review Type Date Requested Status
Tony Espy Approve
Matteo Croce (community) Approve
Review via email: mp+304892@code.launchpad.net

Commit message

Ignore BLIP camera by using udev rules (LP: #1615853)

Description of the change

Ignore BLIP camera by using udev rules (LP: #1615853)

To post a comment you must log in.
Matteo Croce (teknoraver) :
review: Approve
Tony Espy (awe) wrote :

Looks good to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/modemmanager b/bin/modemmanager
2index e6de1de..3aa78c3 100755
3--- a/bin/modemmanager
4+++ b/bin/modemmanager
5@@ -7,10 +7,8 @@ set -x
6 cp $SNAP_APP_PATH/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf \
7 /etc/dbus-1/system.d/$SNAP_APP.conf
8
9-# We need a specific udev rule in place in order to tag all
10-# devices we might be interested in with a property so we
11-# can iterate them on startup.
12-cp $SNAP_APP_PATH/conf/80-mm-candidate.rules /etc/udev/rules.d/
13+# Copy around mm udev rules
14+cp $SNAP_APP_PATH/conf/*.rules /etc/udev/rules.d/
15 # Reload all device information so that our new rule gets applied
16 udevadm trigger
17
18@@ -33,6 +31,5 @@ $SNAP_APP_PATH/usr/sbin/ModemManager \
19 "$@"
20
21 # Cleanup everything we copied into the system
22-rm /etc/udev/rules.d/80-mm-candidate.rules \
23- /etc/udev/rules.d/77-mm-telit.rules
24+rm /etc/udev/rules.d/*-mm-*rules
25 udevadm trigger
26diff --git a/conf/77-mm-usb-device-blacklist.rules b/conf/77-mm-usb-device-blacklist.rules
27new file mode 100644
28index 0000000..9cfc805
29--- /dev/null
30+++ b/conf/77-mm-usb-device-blacklist.rules
31@@ -0,0 +1,10 @@
32+# do not edit this file, it will be overwritten on update
33+
34+ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
35+SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
36+ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_end"
37+
38+# Analog Devices BLIP camera
39+ATTRS{idVendor}=="064b", ATTRS{idProduct}=="7823", ENV{ID_MM_DEVICE_IGNORE}="1"
40+
41+LABEL="mm_usb_device_blacklist_end"
42diff --git a/snapcraft.yaml b/snapcraft.yaml
43index f5b8d5c..f023777 100644
44--- a/snapcraft.yaml
45+++ b/snapcraft.yaml
46@@ -73,7 +73,7 @@ parts:
47 bin/dnsmasq: bin/dnsmasq
48 conf/NetworkManager.conf: etc/NetworkManager/NetworkManager.conf
49 conf/dnsmasq-dbus.conf: conf/dnsmasq-dbus.conf
50- conf/80-mm-candidate.rules: conf/80-mm-candidate.rules
51+ conf/*.rules: conf/
52
53 networkmanager:
54 plugin: x-custom

Subscribers

People subscribed via source and target branches