LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File zfs-0.6.5.3-fix-using-udevadm.patch of Package zfs (Project home:Ledest:kernel:lts)

diff -Ndur zfs-0.6.5.3/scripts/common.sh.in zfs-0.6.5.3-fix-using-udevadm/scripts/common.sh.in
--- zfs-0.6.5.3/scripts/common.sh.in	2015-10-14 01:35:23.000000000 +0300
+++ zfs-0.6.5.3-fix-using-udevadm/scripts/common.sh.in	2015-10-17 22:43:59.728343961 +0300
@@ -547,13 +547,15 @@
 # Trigger udev and wait for it to settle.
 #
 udev_trigger() {
-	if [ -f ${UDEVADM} ]; then
-		${UDEVADM} trigger --action=change --subsystem-match=block
-		${UDEVADM} settle
+	if [ -x ${UDEVADM} ]; then
+		UDEVTRIGGER="${UDEVADM} trigger --action=change --subsystem-match=block"
+		UDEVSETTLE="${UDEVADM} settle"
 	else
-		/sbin/udevtrigger
-		/sbin/udevsettle
+		UDEVTRIGGER=/sbin/udevtrigger
+		UDEVSETTLE=/sbin/udevsettle
 	fi
+	$UDEVTRIGGER
+	$UDEVSETTLE
 }
 
 #