blob: c0032493ebf7fc11e65047ae8d23fdfe79bb5fcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
diff -ru linuxconsoletools-1.4.8.orig/utils/jscal-restore.in linuxconsoletools-1.4.8/utils/jscal-restore.in
--- linuxconsoletools-1.4.8.orig/utils/jscal-restore.in 2011-12-15 10:49:01.000000000 -0500
+++ linuxconsoletools-1.4.8/utils/jscal-restore.in 2015-05-16 01:54:00.799168225 -0400
@@ -6,8 +6,13 @@
exit 1
fi
-if [ ! -x /sbin/udevadm ]; then
- echo Restoring joystick configuration requires udev! >&2
+for f in /sbin/udevadm /bin/udevadm ;
+do
+ [ -x $f ] && UDEVADM=$f
+done
+
+if [ -z "$UDEVADM" ] ; then
+ echo Storing joystick configuration requires udev! >&2
exit 1
fi
@@ -30,7 +35,7 @@
# in the NAME value
IFS=$'\x0A'
-for ATTRIBUTE in $( /sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident ); do
+for ATTRIBUTE in $( ${UDEVADM} info -a -n $1 | @@PREFIX@@/share/joystick/ident ); do
ID=$( echo "$ATTRIBUTE" | cut -f 1 -d = )
VALUE=$( echo "$ATTRIBUTE" | cut -f 2 -d \" )
case $ID in
diff -ru linuxconsoletools-1.4.8.orig/utils/jscal-store.in linuxconsoletools-1.4.8/utils/jscal-store.in
--- linuxconsoletools-1.4.8.orig/utils/jscal-store.in 2011-12-15 10:49:01.000000000 -0500
+++ linuxconsoletools-1.4.8/utils/jscal-store.in 2015-05-16 01:53:18.725607838 -0400
@@ -11,14 +11,18 @@
echo "Stores the device's calibration for future use."
exit 1
fi
+for f in /sbin/udevadm /bin/udevadm ;
+do
+ [ -x $f ] && UDEVADM=$f
+done
-if [ ! -x /sbin/udevadm ]; then
+if [ -z "$UDEVADM" ] ; then
echo Storing joystick configuration requires udev! >&2
exit 1
fi
ident=$(mktemp)
-/sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
+${UDEVADM} info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
. $ident
rm $ident
|