Comment 14 for bug 44836

Revision history for this message
Georg C.F. Wolff (boeser-wolff) wrote :

An alternate solution - instead of waiting a fixed time - is to modify /etc/network/if-up.d/mountnfs to include a runlevel-check:

                RUNLEVEL=`runlevel`

                while [ "${RUNLEVEL}" = "unknown" ]; do
                  if ps aux | grep -q " sh /etc/rcS.d/S45waitnfs.sh start$"; then
# pidof doesnt work if waitnfs is started "sh /etc/.../S45waitnfs.sh"
                    break
                  fi

                  sleep 0.1
                  RUNLEVEL=`runlevel`
                done

This will prevent the mountnfs script from being run to early, but also abort if the waitnfs script is running. This prevents collisions between these two scripts.