Ignore:
Timestamp:
Mar 14, 2012, 2:42:33 AM (7 years ago)
Author:
bruno
Message:

r4564@localhost: bruno | 2012-03-13 00:55:09 +0100

  • Fix more #589 by removing fixed path for grep in mindi, and managing correctly paths for udev related binaries in mindi and rcS
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/rootfs/etc/init.d/rcS

    r2964 r2965  
    322322    ps | grep -v grep |grep udevd 2> /dev/null 1> /dev/null
    323323    if [ $? -ne 0 ]; then
    324         /sbin/udevd --daemon &
     324        if [ -x /sbin/udevd ]; then
     325            /sbin/udevd --daemon &
     326        elif [ -x /usr/bin/udevd ]; then
     327            /usr/bin/udevd --daemon &
     328        fi
    325329        echo "Waiting for udev to start..."
    326330        sleep 5
     
    337341        /sbin/udevsettle --timeout=10
    338342        LogIt "Discovering with udevsettle"
    339     elif [ -x /sbin/udevadm ]; then
    340         UdevadmTrigger
    341         /sbin/udevadm settle --timeout=10
     343    elif [ -x /sbin/udevadm ] || [ -x /usr/bin/udevadm ]; then
     344        ua=`UdevadmTrigger`
     345        $ua settle --timeout=10
    342346        LogIt "Discovering with udevadm"
    343347    fi
     
    709713UdevadmTrigger() {
    710714
     715# This function should just echo the return value $ua
     716
    711717if [ -x /sbin/udevadm ]; then
    712     v=`/sbin/udevadm --version`
    713     echo "Triggering udev again..."
    714     if [ "$v" -ge "146" ]; then
    715         /sbin/udevadm trigger --type=failed
     718    ua="/sbin/udevadm"
     719elif [ -x /usr/bin/udevadm ]; then
     720    ua="/usr/bin/udevadm"
     721else
     722    LogIt "WARNING: Unable to find udevadm. Not triggering udev"
     723    ua="/bin/true"
     724fi
     725
     726v="`$ua --version`"
     727
     728if [ -x "$v" ]; then
     729    LogIt "Triggering udev again..."
     730    if [ "$v" -ge "146" -a "$v" -lt "174" ]; then
     731        $ua trigger --type=failed
     732    elif [ "$v" -lt "146" ]; then
     733        $ua trigger --retry-failed
    716734    else
    717         /sbin/udevadm trigger --retry-failed
    718     fi
    719 fi
     735        LogIt "... not needed"
     736    fi
     737fi
     738echo $ua
    720739}
    721740
     
    733752    # (useful for rules creating network ifcfg files)
    734753    if [ -e "/tmp/USE-UDEV" ] ; then
    735         UdevadmTrigger
     754        ua=`UdevadmTrigger`
    736755    fi
    737756}
     
    940959# Not sure it's still needed, but shouldn't hurt
    941960if [ -e "/tmp/USE-UDEV" ] ; then
    942     UdevadmTrigger
     961    ua=`UdevadmTrigger`
    943962fi
    944963if grep "backup-media-type" /tmp/mondo-restore.cfg > /dev/null 2> /dev/null ; then
Note: See TracChangeset for help on using the changeset viewer.