Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-25-2013, 01:21 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
udev question: using external programs to name device

Hi all, I'm stuck on this udev rule. I want to use a shell script to name a device.

KERNEL=="sr0", PROGRAM="/etc/cazzette %k", SYMLINK+="%c"

echo cazzette_$1

This should name my device as /dev/cazzette_sr0, correct? For some reason, it's not working. Can someone give me a tip why it's not?

What I want to do is actually much more complicated. I want to eventually do something like PROGRAM="/etc/cazzette %p" and run the devpath through a bunch of find/cut/awk/sed/etc.

Old 04-25-2013, 01:04 PM   #2
LQ Newbie
Registered: Apr 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I think I figured it out. I needed a shebang (#!/bin/sh) in /etc/cazzette. Didn't think it was that critical to cause it to fail.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
External storage device question satimis Linux - Hardware 3 02-17-2011 10:20 PM
[SOLVED] Udev creates the external usb hard disk device node too late pastoreerrante Linux - Software 2 05-24-2010 12:42 AM
A question regarding external device access dongbo Programming 2 11-18-2009 04:12 AM
Using udev to tell Ubuntu to use the proper device on a multiple USB device Jeff91 Linux - Hardware 20 08-20-2009 12:10 PM
udev and a new device jmoody Linux - Software 12 10-11-2007 12:32 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:46 PM.

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