Fix match on Windows/Linux

i9 changed/i9/xrdp-usb-1.1-2.el9
Arkady L. Shane 1 year ago
parent 76a8c125f3
commit 1289262072
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -1,15 +1,14 @@
From 0a4e877f9dabf68e265e3d754d2a14217f0b0756 Mon Sep 17 00:00:00 2001 From 05a656ebeccd151e4c78eae3704fcd291d2263ae Mon Sep 17 00:00:00 2001
From: tigro <arkadiy.sheyn@softline.com> From: tigro <arkadiy.sheyn@softline.com>
Date: Mon, 9 Oct 2023 12:50:03 +0300 Date: Mon, 9 Oct 2023 12:50:03 +0300
Subject: [PATCH] Update matches Subject: [PATCH] Update matches
--- ---
usbip-attach | 4 ++-- usbip-attach | 4 ++--
2 files changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
delete mode 100644 .usbip-attach.swp
diff --git a/usbip-attach b/usbip-attach diff --git a/usbip-attach b/usbip-attach
index d64767a..3e4a5f4 100755 index d64767a..5ae33cd 100755
--- a/usbip-attach --- a/usbip-attach
+++ b/usbip-attach +++ b/usbip-attach
@@ -7,11 +7,11 @@ @@ -7,11 +7,11 @@
@ -22,10 +21,10 @@ index d64767a..3e4a5f4 100755
echo "$(date) Connected from $host" >> $log_file echo "$(date) Connected from $host" >> $log_file
$usbip_program list -r "$host" 2>&1 >> $log_file $usbip_program list -r "$host" 2>&1 >> $log_file
-$usbip_program list -r "$host" 2>/dev/null | sed -n 's/^ *\([0-9-]\+\):.*$/\1/p' | while read id;do -$usbip_program list -r "$host" 2>/dev/null | sed -n 's/^ *\([0-9-]\+\):.*$/\1/p' | while read id;do
+$usbip_program list -r "$host" 2>/dev/null | awk -F/ '/\/sys\/devices\// { print $NF }' | while read id;do +$usbip_program list -r "$host" 2>/dev/null | sed -n 's/^ *\([0-9-].*[0-9]\+\): .*$/\1/p' | while read id;do
echo "Found exported USB device $id, try to attach..." >> $log_file echo "Found exported USB device $id, try to attach..." >> $log_file
$usbip_program attach -r "$host" -b "$id" 2>&1 >> $log_file $usbip_program attach -r "$host" -b "$id" 2>&1 >> $log_file
done done
-- --
2.41.0 2.43.0

@ -1,7 +1,7 @@
Summary: Infrastructure for redirect USB devices to XRDP session Summary: Infrastructure for redirect USB devices to XRDP session
Name: xrdp-usb Name: xrdp-usb
Version: 1.1 Version: 1.1
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv3+ License: GPLv3+
URL: http://altlinux.org URL: http://altlinux.org
@ -71,8 +71,8 @@ fi
%{_sbindir}/usbip-attach %{_sbindir}/usbip-attach
%changelog %changelog
* Mon Oct 09 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1-1 * Fri Dec 1 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1-2
- Rebuilt for MSVSphere 9.2 - Fix match on Windows/Linux
* Thu Oct 5 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1-1 * Thu Oct 5 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1-1
- Rebuilt for MSVSPhere 9.2 - Rebuilt for MSVSPhere 9.2

Loading…
Cancel
Save