File s390-tools-sles11sp2-mon_statd-udevsettle.patch of Package s390-tools
Description: mon_statd: fix error "udevsettle: command not found"
Symptom: Starting mon_statd results in the following error message:
"udevsettle: command not found"
Problem: Calling udevsettle is hard-coded in mon_statd, which leads to
an error if the udevsettle command is not available.
Solution: Check for udevsettle and if not available use "udevadm settle"
instead (if udevadm is available).
Problem-ID: 79805
---
etc/init.d/mon_statd | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
--- a/etc/init.d/mon_statd
+++ b/etc/init.d/mon_statd
@@ -31,6 +31,15 @@ if [ -f $CONFIG_FILE ]; then
. $CONFIG_FILE
fi
+UDEVSETTLE=/sbin/udevadm
+if [ ! -e $UDEVSETTLE ]
+then
+ UDEVSETTLE=/sbin/udevsettle
+ UDEVSETTLE_CALL="$UDEVSETTLE --timeout=10"
+else
+ UDEVSETTLE_CALL="$UDEVSETTLE settle --timeout=10"
+fi
+
load_kernel_module()
{
if [ ! -e /dev/monwriter ]; then
@@ -39,9 +48,9 @@ load_kernel_module()
if [ $? -ne 0 ]; then
exit 1
fi
- udevsettle
- if [ $? -ne 0 ]; then
- exit 1
+ if [ -e $UDEVSETTLE ]
+ then
+ $UDEVSETTLE_CALL
fi
fi
}