Debian Configuration :: Udev Script To Run Service On Device Insertion

Jan 24, 2010

I have just bought a DVB-T usb dongle to watch some TV. The software I'm using is vdr, which has to be started through the /etc/init.d/vdr service. I have created a udev script that executes the service on device insertion. It works nicely, however now when I boot up the computer it takes ages to get to desktop. I believe it is because of the WAIT_FOR part. But without this part, the service starts too soon because the usb dongle has been inserted but the firmware has not finished loading. Can someone point out an alternative way to do it? The script is here [URL].

View 4 Replies


ADVERTISEMENT

Debian Configuration :: Udev Static Device Change From Wheezy To Jessie

Sep 9, 2015

I am using a 3rd party kernel driver that does not support udev properly. When I was using wheezy I placed the required device files in /lib/udev/devices.

The udev in jessie does not appear to support this. Is there any way to have udev create these device files or will I have to create then using a script at boot-up?

View 1 Replies View Related

Debian :: Hardcode Device Input Using Udev?

Jun 7, 2011

My touchscreen "LG Display LGD-MultiTouch" will be recognized sometimes as /dev/input/event0 and sometimes as /dev/input/event3. How to hardcode /dev/input/event0 using udev and xorg.conf?

Code:
# cat /proc/bus/input/devices
I: Bus=0003 Vendor=1fd2 Product=0064 Version=0100
N: Name="LG Display LGD-MultiTouch"
P: Phys=usb-0000:00:1d.7-4.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=1b
B: KEY=403 0 30000 0 0 0 0 0 0 0 0
B: ABS=700 3f
B: MSC=10

# udevadm info --query=all --path=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
P: /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: PRODUCT=3/1fd2/64/100
E: NAME="LG Display LGD-MultiTouch"
E: PHYS="usb-0000:00:1d.7-4.1/input0"
E: UNIQ=""
E: EV==1b
E: KEY==403 0 30000 0 0 0 0 0 0 0 0
E: ABS==700 3f
E: MSC==10
E: MODALIAS=input:b0003v1FD2p0064e0100-e0,1,3,4,k110,111,140,141,14A,ra0,1,2,3,4,5,28,29,2A,m4,lsfw
E: SUBSYSTEM=input

View 3 Replies View Related

Programming :: How To Install Kernel Modules Automatically After Device Insertion

Jan 18, 2011

ubuntu could delay kernel module installation until device is inserted?Take my usb ath9271 wifi adapter as an example: when kernel boot up, no ath modules are installed until usb wifi apdapter is inserted, ath related modules are insmod.Could anybody how to achieve this? udev or something else?

View 5 Replies View Related

Debian :: Use Udev Rules To Prevent HDDs To Change Device Instead Of Using UUID In /etc/fstab?

Dec 15, 2010

UUIDs make fstab hard to read, so.. Is it possible to use udev rules to prevent HDs to change device, instead of using UUID in /etc/fstab?

View 2 Replies View Related

Debian Configuration :: Automount External USB HD Using Udev

Jan 23, 2011

I have a problem copying my udev rules from other distro to another pc running debian. My box is running debian without any DE and I want my USB disks to be automounted based on the label; I believe udev is the nicest way to do this task.

Anyways : my rules are (copied from archlinux wiki btw)
cat /etc/udev/rules.d/92-my-media-automount.rules
# vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=udevrules:
# /etc/udev/rules.d/92-my-media-automount.rules
# Only work on sd*
KERNEL!="sd[a-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end" .....

I notice the directory is made successfully up inserting the usb HD, but the mount doesn't succeed. If I manually execute above command, the mount goes ok.

View 7 Replies View Related

Debian Configuration :: Udev / Systemd Change Some Rules In 8.0

Apr 18, 2016

I have SSD drives without SCT support, because of this I want to tune /sys/block/device-name/device/timeout in order to force mdadm put these drives offline. So, I can see my drive like this:

/dev/disk/by-id/ata-OCZ-SABER1000_A22MJ061512000074.

Where can I tune /sys/block/device-name/device/timeout from 30 to 7 sec only for these drive? I don't want to use rc.local.

Can I create right udev rules for it in /etc/udev/rules.d?

I want to avoid any conflict with /lib/udev/rules.d.

Code: Select all# udevadm monitor --environment --udev
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [9302.549485] add      /devices/pci0000:00/0000:00:01.2/0000:03:00.0/host0/target0:0:0 (scsi)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:01.2/0000:03:00.0/host0/target0:0:0
DEVTYPE=scsi_target
SEQNUM=5210
SUBSYSTEM=scsi

[Code] ....

View 0 Replies View Related

Debian Configuration :: Udev Rules To Change R/W Permissions?

Mar 28, 2011

I'm trying to allow non-root account to use avrdude to program mucrocontrollers. There are many articles online about how to do that, but it seems not to work for me. Every time i try to execute avrdude it says "permission denied". Here's "$ udevadm info --name=/dev/bus/usb/002/011 --attribute-walk" says looking at device '/devices/pci0000:00/0000:00:1d.1/usb2/2-1':

KERNEL=="2-1"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{configuration}==""

[code]....

However, after restarting udev, replugging the device, even rebooting the computer I still get "permission denied". The Vendor and Product match, so what's the problem?

View 7 Replies View Related

Debian Configuration :: Synaptics Udev Rules Ignored After Yesterdays Upgrade?

Apr 14, 2010

After yesterdays upgrade of Squeeze, my Synaptics touchpad's udev configuration is ignored on my EeePC. It was working fine before. Are there any changes in how it is supposed to be configured or is it just broken?

View 3 Replies View Related

Debian Configuration :: Udev Warning Messages At Boot After Upgrade?

Apr 23, 2011

I've done an upgrade from lenny to squeeze.Now, I'm getting a lot of udev warning messages at the boot time.Knows someone howto remove them?

View 6 Replies View Related

Debian Configuration :: Fresh Install Shows Udev Failure ?

May 10, 2011

I've just installed 'Testing' on a VMware server and after I completed the install with no problems, the system booted into the kernel and I noticed the following start up process error:

startpar: service(s) returned failure: udev...failure!

I have not seen this before and am not sure if it's related to the fact that this is a virtual machine and not a physical server or something else.

Here is a Screenshot.

View 1 Replies View Related

Debian Configuration :: How To Hardcode/fix A Udev Roule For /dev/input/event0

Jun 17, 2011

How to hardcode/fix a udev roule for /dev/input/event0?For example my touchscreen device jumped after restart, sometimes will be recognized as input3 and sometimes as input0.

I: Bus=0003 Vendor=1fd2 Product=0064 Version=0100
N: Name="LG Display LGD-MultiTouch"
P: Phys=usb-0000:00:1d.7-4.1/input0

[code]....

View 1 Replies View Related

Debian Configuration :: Creating Udev Rule For Specific SATA Port

Apr 19, 2011

I have a trayless SATA hotswap bay that is really terrific for quickly attaching and removing SATA hard drives. I'm trying to write a udev rule to create a symbolic link to the device node for the drive that is attached through the hotswap bay (/dev/bay -> /dev/sdX). This eliminates any ambiguity when performing destructive tasks (fdisk, etc). I'm running squeeze amd64. I've read through several tutorials and have it working somewhat. Here's the output of udevadm info for a drive attached via the hotswap bay.

looking at device '/devices/pci0000:00/0000:00:11.0/host7/target7:0:0/7:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="156301488"
ATTR{alignment_offset}=="0"
ATTR{capability}=="52" ....

Here is my udev rule
DEVPATH=="/devices/pci0000:00/0000:00:11.0/host7/*", SUBSYSTEM=="block", SYMLINK+="bay%n"

This produces the desired behavior and gives me an fdisk-able device node. The problem I am having is that the "host" component of the DEVPATH varies from bootup to bootup. I'm just using on onboard SATA, host2-7, specifically host7. There is also onboard PATA, host0-1. It seems to just be random which "host"s are assigned to which controller. For example, the next time I boot the system, the onboard SATA will be host0-5 and the onboard PATA will be host6-7. In this simple case, I could just write 2 rules, one for each possibility and it would still be correct because of the different PCI addresses of the two controllers. But on systems with more SCSI (uh... libata, actually) controllers, a "host" file can point to different physical ports between bootstraps. This would be bad. Does anyone know of a way to write a rule to tie a device node to a specific physical SATA port on the motherboard/hba?

View 1 Replies View Related

Fedora :: Troubleshoot Slow Udev-settle Service?

Jun 14, 2011

F15_x64, upgraded from F14 on Sandy Bridge. Any idea how to troubleshoot this slow loading service?

Code:
[root@sandy andy]# systemd-analyze blame
4598ms udev-settle.service
1611ms fedora-wait-storage.service
Code:
[root@sandy andy]# systemd-analyze
Startup finished in 2024ms (kernel) + 1527ms (initrd) + 11217ms (userspace) = 14770ms
[root@sandy andy]#

[Code]...

I've tried systemctl disable udev-settle.service, but it doesn't work, service loads on every boot.

View 2 Replies View Related

Debian Configuration :: Dns Service For Email?

Jul 27, 2010

I want to install a email server so my domain handles it's on email. I understand I need a dns server first. I down loaded dbndns but can not even figure out how to start it. does anyone know how to get this set up. Or where the setup files is for this.

View 2 Replies View Related

Debian Configuration :: Systemd Custom Service

Aug 4, 2015

On macbook air 6.2, i've installed a Debian jessie mate DE, dual boot using refind. I'm currently fine-tuning it. I've made a script following powertop advice:

Code: Select all[newb@debian /etc/systemd/system]$ cat mba_kb_sp.sh
#!/bin/sh
echo 'auto' > '/sys/bus/usb/devices/1-3.1/power/control';
echo 'auto' > '/sys/bus/usb/devices/1-3.2/power/control';
echo 'auto' > '/sys/bus/usb/devices/1-5/power/control';
exit 0

[Code] ....

All seems to work fine, however when i check the sys file it didn't change. But I can start manually the systemd service and, this time, it works.

View 2 Replies View Related

Debian Configuration :: How To Enable Gdm3 Service

Mar 16, 2011

I have accidentally stoped gdm3 service with BootUP-Manager and now i cant enable it again. I can start it from terminal with sudo service gdm3 start i have tryed to dpkg-reconfigure gdm3 and purge/install. This are services running on startup [ + acpid

[ - ] anacron
[ + ] apache2
[ + ] atd

[code].....

View 3 Replies View Related

Debian Configuration :: Jessie - Service Samba Restart

Oct 20, 2014

I've after latest jessie update a problem with service samba restart. If I use "service samba restart", there is a timeout (after long time) and error.

Output of "systemctl status samba.service":

Code:
Select all● samba.service - LSB: ensure Samba daemons are started (nmbd and smbd)
   Loaded: loaded (/etc/init.d/samba)
   Active: failed (Result: timeout) since Mo 2014-10-20 02:16:57 CEST; 7s ago
  Process: 6205 ExecStart=/etc/init.d/samba start (code=killed, signal=TERM)

Okt 20 02:16:57 server systemd[1]: samba.service start operation timed out. Terminating.
Okt 20 02:16:57 server systemd[1]: Failed to start LSB: ensure Samba daemons are started (nmbd and smbd).

[Code] ....

Whats going wrong. "service samba restart" should bring no error message if the service is not running previously.

View 2 Replies View Related

Debian Configuration :: Jessie With XFCE - Service Fails

Feb 10, 2016

I am using Jessie with XFCE and I tried to write a service which executes a script to change my wallpaper. When I try to start the service with systemctl start wallpaper.service it fails and I get the outout below from systemctl status wallpaper.service

I don't think it to be a permissions issue, they are -rw- r-- r--

This service is called by a timer that goes off daily. Below is wallpaper.service

View 5 Replies View Related

Debian Configuration :: How To Service /var, /proc, /opt To Stay Out Of Troubles

Jan 26, 2010

HDD partitioned for novice - everything in one partition, in one folder /.

/dev/sda3117290636 38456100 72876432 35% /
tmpfs 103746010374600% /lib/init/rw
udev10240852 93889% /dev

[code]....

View 3 Replies View Related

Debian Configuration :: Service Settings Safe To Turn Off?

May 12, 2010

My system goes through slow periods where it just crawls and others where it's fine, but I'm wondering which service settings are OK to just shut off to give me a bit more oomph when I boot up.The others I'm pretty OK with like spam assassin, dictionary server and so on, but some of the others i wonder if they only serve to slow things down..Also..I live in a very dusty environment and I KNOW the fans and other parts get caked with dust and it wouldn't surprise me if the dust got so bad it just stops the fans completely so once in a while I use my air compressor to blow the crud out and I usually get covered myself, but how safe is using the compressor? It's not the type that typically fills up with condensed water droplets so that isn't a super critical issue..It's a small 1 hp deal, elect drive and so on.. Safe enough? It's all I have and/or can afford..

View 1 Replies View Related

Debian Configuration :: Udev Times Out Resulting In 3 Min Boot Times

Jan 21, 2016

My systemd-udev-settle.service is failing for some reason.

systemctl status systemd-udev-settle.service -a output
Code: Select all● systemd-udev-settle.service - udev Wait for Complete Device Initialization
   Loaded: loaded (/lib/systemd/system/systemd-udev-settle.service; static)
   
[ode]...

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

View 6 Replies View Related

Debian Configuration :: Adding Router For Mail Service Function?

Jun 10, 2011

I'm building a Debian based router, I want to add to this router a mail service function. I don't want mail to be sent outside of the network, what I want is the ability for services to send mail to the Debian server and for me to then pick them up from this server via pop3 into my normal mail application. Given I'm not looking for mail to be sent outside of the network and its strictly for services to log notifications via. What of the various mail applications should I setup? i.e. just looking for SMTP + POP3 internally.

View 5 Replies View Related

Debian Configuration :: How To Start And Stop Asterisk Service By Non Root User

Aug 25, 2011

I am using debian squeeze server with asterisk 1.6 installed and configured.my problem is non root users need to access the server using ssh and restart asterisk server after making changes in asterisk configuration files.As of now i am giving root username/password for this process (i know it is not at all a good idea) .now how can i create a username and configure it which can only access and modify asterisk configuration files and restart asterisk server without any other privileges.

View 1 Replies View Related

Debian Multimedia :: Encrypted DVDs Are Not Recognized Upon Insertion

Jun 21, 2015

I have Debian Jessie installed. When I insert a non-encrypted DVD movie DVD into the drive, a pop-up menu appears asking me what I want to do (e.g. "Open with vlc media player, etc.).

When I insert an encrypted DVD movie DVD into the drive, no pop-up menu appears.

I am able to play the encrypted movie DVD in vlc, and libdvdcss2 is installed. So my question is not about playing the DVD but rather about the failure to automatically detect it.

This behaviour happens in Gnome, Mate, and XFCE. (KDE has a Plasma Device Notifier Widget that is able to detect the encrypted DVD).

My other computer with Debian Wheezy is able to automatically recognize the encrypted DVD.

Here are the relevant lines from /var/log/syslog after the insertion of the encrypted DVD:

Code: Select allJun 21 14:52:04 debian-think-pad kernel: [ 2012.208964] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208972] sr 1:0:0:0: [sr0] 
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208977] Sense Key : Illegal Request [current]
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208986] Info fld=0x400

[Code] ....

Here are the relevant lines from /var/log/syslog after the insertion of the non-encrypted DVD:

Code: Select allJun 21 14:55:39 debian-think-pad kernel: [ 2226.518955] UDF-fs: INFO Mounting volume 'Check Please', timestamp 2009/06/02 17:43 (1e5c)
Jun 21 14:55:39 debian-think-pad udisksd[1161]: Mounted /dev/sr0 at /media/daniel/Check Please on behalf of uid 1000
Jun 21 14:55:39 debian-think-pad org.gtk.Private.UDisks2VolumeMonitor[1081]: index_parse.c:191: indx_parse(): error opening /media/daniel/Check Please/BDMV/index.bdmv
Jun 21 14:55:39 debian-think-pad org.gtk.Private.UDisks2VolumeMonitor[1081]: index_parse.c:191: indx_parse(): error opening /media/daniel/Check Please/BDMV/BACKUP/index.bdmv

Whan I run the mount command after inserting the non-encrypted DVD the following line appears in the output:

Code: Select all/dev/sr0 on /media/daniel/Check Please type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,umask=77,iocharset=utf8,uhelper=udisks2)

Granted, this issue is not a major problem as I can start vlc and play the DVD. However, it might be useful to some new users to Linux to have the pop-up menu appear. Additionally, it would be interesting to learn why it works in Debian Wheezy and not in Debian Jessie.

View 0 Replies View Related

Debian Configuration :: Jessie Service Script Not Calling Status And Stop Routines

Apr 1, 2016

I am the author of an internet radio for the Raspberry PI originally running on Debian Wheezy. The radio (radiod) service is started and stopped using the usual service commands:

service radiod start|stop|status

Since upgrading to Debian Jessie the service status and stop routines in my radio daemon are no longer called.

For example:

# service radiod status
● radiod.service - LSB: Raspberry PI Radio Daemon
Loaded: loaded (/etc/init.d/radiod)
Active: active (running) since Thu 2016-03-31 20:17:07 CEST; 15h ago
Process: 380 ExecStart=/etc/init.d/radiod start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/radiod.service
└─603 python /usr/share/radio/ada_radio.py start

If I call my program (which runs as a daemon) I see the status message from my program

# ./radiod.py status
radiod running pid 603

I have established that service stop never calls my program routines to shutdown the radiod daemon when the system is rebooted (I see that from my log files).

The reboot hangs for about 5 minutes whilst stopping the radiod service (because stop never calls my stop routines).

Below is my radiod script, which is fairly conventional, and which has been working all the time until I ported to Debian Jessie.

/etc/init.d/radiod
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: radiod
# Should-Start:
# Should-Stop:

[Code] ....

View 4 Replies View Related

Red Hat :: Creating Raw Device Via Udev Rules

Apr 12, 2010

I have a Linux server that runs the Sybase DB. Sybase suggests using character devices to access raw devices rather than O_DIRECT to block devices, or cooked FS's. So, I went ahead and configured /etc/sysconfig/rawdevices as such:

/dev/raw/raw1 /dev/vg01/tempdb
/dev/raw/raw2 /dev/vg01/testdb
/dev/raw/raw3 /dev/vg01/fakedb ...

This works fine. I set 'chkconfig rawdevices on' and all is well. I read that this method is deprecated and went about trying to accomplish the same via Udev rules. I already use udev rules in /etc/udev/rules.d/60-raw.rules to set permissions on these devices, i.e.
ACTION=="add", KERNEL=="raw*", OWNER=="sybase", GROUP=="sybase", MODE=="0660"

That works fine. I even set symbolic links:
KERNEL=="raw1", SYMLINK+="vg01/rtempdb"
KERNEL=="raw2", SYMLINK+="vg01/rtestdb1"
KERNEL=="raw3", SYMLINK+="vg01/rfakedb2"

But I cannot seem to get the actual device creation piece to work within udev (it only works using rawdevices). I've tried:
ACTION=="add", KERNEL=="vg01/tempdb", RUN+="/bin/raw /dev/raw/raw1 %N"

No errors, but nothing happens. The device just doesn't create. I've also tried doing it by passing major and minor numbers. Is it possible to get all of this into udev rules or am I stuck with rawdevices? I'm also utterly confused as to the future of rawdevices... the raw man page said it was deprecated, and now at v5.5 it has that piece taken out. Also RHEL 5.3 dropped support for rawdevices in initscripts only to add itback in 5.4. I'm an admin, not a DBA, so I cannot say if this is a bad or good way, only that it is the way the vendor supports and recommends, so it is the way that I must go... just trying to make it work as "un-deprecated" and cleanly as possible.

View 1 Replies View Related

Fedora :: Udev Rules For Using USB Device Not As Root

Oct 15, 2010

Having finally made the switch from Windows (7 Professional) to Linux (Fedora 13) on my laptop, I'm now trying to get all my devices working, specifically an Olympus VN-4100PC Digital Voice Recorder. I've installed odvr and it works in root, but not as a normal user. The installation instructions say: odvr *requires* access to the user-space USB interface.

It is recommended to place "41-odvr.rules" into "/etc/udev/rules.d" or setup your own udev rules rather than running odvr as root. After changing udev rules, don't forget to run "udevcontrol reload_rules" and to replugin your DVR. Again, root privileges are required unless udev is properly setup. The file "41-odvr.rules" (designed for Ubuntu) has the following content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="07b4", SYSFS{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"

I tried just doing what it said and copying it to "/etc/udev/rules.d" but it didn't seem to work. Looking at other files, I then changed it to:
SUBSYSTEM=="usb", ATTR{idVendor}=="07b4", ATTR{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"

And now if I do "ls -l /dev/bus/usb/002", I get:
crw-rw-r--. 1 root audio 189, 134 Oct 15 01:21 007

Which seems to suggest that it is running the "41-odvr.rules" file, since lsusb gives:
Bus 002 Device 007: ID 07b4:020d Olympus Optical Co., Ltd Digital Voice Recorder VN-240PC

But odvr still doesn't work as a normal user, giving:
Failed to open Olympus device: couldn't claim interface

View 2 Replies View Related

General :: Pipe Screen To Video Device (Udev)

Mar 20, 2010

Is there any way to pipe video from the screen to a video device that can be used as if it came from a webcam? I assume it uses udev somehow...

View 4 Replies View Related

General :: Preventing Udev From Creating Device Entries Under /dev

May 21, 2010

I need to prevent udev from creating the /dev/v4l/by-path/* and /dev/v4l/by-id/* files upon connecting my webcam. The problem is that Kopete doesn't want to display the video if these files are present. It works fine if I remove them, but I'd rather not have them created in the first place, since they seem to be completely useless anyway.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved