LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-24-2013, 05:01 AM   #1
nymar
LQ Newbie
 
Registered: Apr 2013
Posts: 7

Rep: Reputation: Disabled
problem with udev


Hi,
When i turn the following script
Code:
    #!/bin/sh

    DEPMOD=`which depmod`
    UDEVCTRL=`which udevcontrol`
    UDEVADM=`which udevadm`

    install -D -m 700 usbcanII.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/usbcanII.ko
    install -m 700 usbcanII.sh /usr/sbin/
    if [ -d /etc/hotplug ] ; then
      install -m 777 usbcanII/usbcanII /etc/hotplug/usb/ ;
      install -m 644 usbcanII/usbcanII.usermap /etc/hotplug/usbcanII.usermap
    fi
    install -m 644 ../10-kvaser.rules /etc/udev/rules.d

    if [ `udevd --version` -lt 128 ] ; then
      $UDEVCTRL reload_rules ;
    else
      $UDEVADM control --reload-rules ;
    fi

    $DEPMOD -a
    if [ "$?" -ne 0 ] ; then
      echo Failed to execute $DEPMOD -a
    fi
i have theses problems
Code:
    [root@raspberrypi usbcanII]# ./installscript.sh
    which: no udevd in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin)
    ./installscript.sh: line 15: udev: command not found
    ./installscript.sh: line 15: [: -lt: unary operator expected
    [root@raspberrypi usbcanII]# which udev
    which: no udev in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin)
    [root@raspberrypi usbcanII]# PATH=/lib/udev/:$PATH
    [root@raspberrypi usbcanII]# ./installscript.sh
    which: no udevcontrol in (/lib/udev/:/lib/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin)
 
Old 04-24-2013, 06:17 AM   #2
nymar
LQ Newbie
 
Registered: Apr 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
As udevd version <> 128 i made the following changes
Code:
  #!/bin/sh

    DEPMOD=`which depmod`
    #UDEVCTRL=`which udevcontrol`
    UDEVADM=`which udevadm`

    install -D -m 700 usbcanII.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/usbcanII.ko
    install -m 700 usbcanII.sh /usr/sbin/
    if [ -d /etc/hotplug ] ; then
      install -m 777 usbcanII/usbcanII /etc/hotplug/usb/ ;
      install -m 644 usbcanII/usbcanII.usermap /etc/hotplug/usbcanII.usermap
    fi
    install -m 644 ../10-kvaser.rules /etc/udev/rules.d

   # if [ `udevd --version` -lt 128 ] ; then
     # $UDEVCTRL reload_rules ;
   # else
      $UDEVADM control --reload-rules ;
   # fi

    $DEPMOD -a
    if [ "$?" -ne 0 ] ; then
      echo Failed to execute $DEPMOD -a
    fi
but i noticed something what happens if /etc/hotplug doesn't exist ?? is it normal ? because for my situation it doesn't exist

Last edited by nymar; 04-24-2013 at 06:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] udev and dbus - using the notivy-send command in a script started by udev markush Slackware 2 10-14-2012 09:26 AM
UDEV: Unable to run a command line interface script after USB automount using udev mohamr2 Linux - Embedded & Single-board computer 8 08-16-2011 10:39 AM
[SOLVED] Chose udev for services... udev starts twice... hotplug fails flipjarg Linux - Newbie 2 09-19-2010 12:49 PM
UDEV - SBLive(emu10k) - Mandriva hangs at UDEV during boot.....still! Grrr. peterlowrie Linux - Hardware 2 05-23-2010 06:37 PM
current users - udev-128 - don't forget rc.udev.new! tobyl Slackware 3 10-08-2008 03:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration