[Pkg-voip-commits] [dahdi-tools] 01/04: add udevadm_path.patch (Closes #852561)

tzafrir at debian.org tzafrir at debian.org
Tue Oct 10 18:40:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit 0a75720af728baaf904e51f0a76f5c2fc1241fa3
Author: Tzafrir Cohen <tzafrir at debian.org>
Date:   Sun Sep 17 13:11:26 2017 +0300

    add udevadm_path.patch (Closes #852561)
---
 debian/patches/series             |  1 +
 debian/patches/udevadm_path.patch | 59 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 200286e..6e4ba04 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ init_unload_oslec
 remove_dahdi_speed
 soname.patch
 no_xtalk_send
+udevadm_path.patch
diff --git a/debian/patches/udevadm_path.patch b/debian/patches/udevadm_path.patch
new file mode 100644
index 0000000..5b1e87c
--- /dev/null
+++ b/debian/patches/udevadm_path.patch
@@ -0,0 +1,59 @@
+From 623a19e319835e19f185e7c3fe71009a884fda33 Mon Sep 17 00:00:00 2001
+From: Tzafrir Cohen <tzafrir at debian.org>
+Date: Wed, 25 Jan 2017 17:55:30 +0200
+Subject: [PATCH] xpp_fxloader: Also look for udevadm in /bin
+
+* udevadm is being moved to /bin. /sbin/udevadm will remain as a
+  compatibility symlink.
+* xpp_fxloader should also look for /bin/udevadm in addition to
+  /sbin/udevadm and /sbin/udevsettle
+* Reverse the order: look for newer ones first.
+---
+ xpp/astribank_hook | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/xpp/astribank_hook b/xpp/astribank_hook
+index fdfa82a..3b5a6fb 100755
+--- a/xpp/astribank_hook
++++ b/xpp/astribank_hook
+@@ -94,22 +94,27 @@ wait_for_udev() {
+ 	UDEV_SETTLE_MAX_TIME=10
+ 
+ 	echo "Waiting for udev to settle down..."
+-	if [ -x /sbin/udevsettle ]; then
+-		# Old system, stand-alone udevsettle command
+-		/sbin/udevsettle --timeout="$UDEV_SETTLE_MAX_TIME"
++	udevsettle_cmd=
++	if [ -x /bin/udevadm ]; then
++		udevsettle_cmd="/bin/udevadm settle"
+ 	elif [ -x /sbin/udevadm ]; then
+-		# Assume modern system, udevadm has settle parameter
+-		if ! /sbin/udevadm settle --timeout="$UDEV_SETTLE_MAX_TIME"
+-		then
+-			echo "udevadm failed ($?)."
+-			echo "Fallback to sleep $UDEV_SETTLE_MAX_TIME seconds."
+-			sleep "$UDEV_SETTLE_MAX_TIME"
+-		fi
++		udevsettle_cmd="/sbin/udevadm settle"
++	elif [ -x /sbin/udevsettle ]; then
++		udevsettle_cmd="/sbin/udevsettle"
+ 	else
+ 		echo "No udevsettle/udevadm."
+ 		echo "Fallback to sleep $UDEV_SETTLE_MAX_TIME seconds."
+ 		sleep "$UDEV_SETTLE_MAX_TIME"
++		return
++	fi
++
++	if ! $udevsettle_cmd --timeout="$UDEV_SETTLE_MAX_TIME"
++	then
++		echo "udevadm failed ($?)."
++		echo "Fallback to sleep $UDEV_SETTLE_MAX_TIME seconds."
++		sleep "$UDEV_SETTLE_MAX_TIME"
+ 	fi
++
+ 	sleep 1	# Wait a bit more (races)
+ }
+ 
+-- 
+2.11.0
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list