-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add udev rule to call usb_change script when USB device change is detected, usb_change call pusb scan if license check is OK. Signed-off-by: Talons Lee <[email protected]> Reviewed-by: Germano Percossi <[email protected]>
- Loading branch information
1 parent
f5d45df
commit c3e7ef0
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (C) Citrix Systems Inc. | ||
# | ||
# This program 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; version 2.1 only. | ||
# | ||
# This program 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 program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
# called by UDEV rule to trigger pusb scan, when USB device change is detected | ||
|
||
. /etc/xensource-inventory | ||
xe pusb-scan host-uuid=${INSTALLATION_UUID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# enable the following line info about usb device | ||
# SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="label_usb" | ||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", GOTO="label_usb" | ||
# enable the following line info about usb block disk | ||
# SUBSYSTEM=="block", SUBSYSTEMS=="usb", KERNEL!="*[0-9]", GOTO="label_usb" | ||
|
||
GOTO="label_end_usb" | ||
|
||
############################################################################### | ||
|
||
LABEL="label_usb" | ||
|
||
ACTION=="add|change|remove", RUN+="/opt/xensource/libexec/usb_change %E{DEVTYPE} %E{ACTION} %E{SEQNUM} %k" | ||
|
||
############################################################################### | ||
|
||
LABEL="label_end_usb" |