#1832 Issue closed: sometimes 'broken pipe' error in system-setup.d/40-start-udev-or-load-modules.sh

Labels: fixed / solved / done, minor bug

jsmeix opened issue at 2018-06-15 12:35:

  • ReaR version ("/usr/sbin/rear -V"):
    current master code

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    can happen probably on any OS
    noticed to happen sometimes at least on SLES12 and SLE15

  • ReaR configuration files ("cat /etc/rear/site.conf" or "cat /etc/rear/local.conf"):
    should not matter here

  • System architecture (x86 compatible or POWER and/or what kind of virtual machine):
    can happen probably on any architecture
    noticed to happen sometimes at least on x86 compatible

  • Are you using BIOS or UEFI or another way to boot?
    should not matter here

  • Brief description of the issue:
    Sometimes during ReaR recovery system starup one can notice
    from 40-start-udev-or-load-modules.sh the message

Running 40-start-udev-or-load-modules.sh...
grep: write error: Broken pipe
  • Work-around, if any:
    We (i.e. SUSE) got the following fix for that issue
    from a SUSE partner who tested SLES15:
diff -Naur /usr/share/rear/skel/default/etc/scripts/system-setup.d/40-start-udev-or-load-modules.sh /usr/share/new-rear/skel/default/etc/scripts/system-setup.d/40-start-udev-or-load-modules.sh
--- /usr/share/rear/skel/default/etc/scripts/system-setup.d/40-start-udev-or-load-modules.sh    2018-04-27 08:17:45.000000000 +0000
+++ /usr/share/new-rear/skel/default/etc/scripts/system-setup.d/40-start-udev-or-load-modules.sh        2018-05-29 15:58:48.138210810 +0000
@@ -22,7 +22,14 @@

 if [[ $systemd_version -gt 190 ]] || [[ -s /etc/udev/rules.d/00-rear.rules ]] ; then
     # systemd-udevd case: systemd-udevd is started by systemd
-    if ps ax | grep -v grep | grep -q systemd-udevd ; then
+    for i in 1 2 3 5 ; do
+        if pidof systemd-udevd &>/dev/null; then
+            break
+        else
+            sleep 2
+        fi
+    done
+    if pidof -s systemd-udevd &>/dev/null; then
         # check if daemon is actually running
         my_udevtrigger
         echo -n "Waiting for udev ... "

jsmeix commented at 2018-07-17 12:59:

I think https://github.com/rear/rear/pull/1869 implements it a bit nicer.

jsmeix commented at 2018-07-18 07:58:

With https://github.com/rear/rear/pull/1869 merged
this issue is fixed.


[Export of Github issue for rear/rear.]