* Re: serial_cs, setserial and UDEV
2006-04-21 22:02 serial_cs, setserial and UDEV Jens Glaser
2006-04-21 22:24 ` Marco d'Itri
@ 2006-04-21 22:59 ` Jens Glaser
2006-04-22 6:36 ` Andrey Borzenkov
2006-04-22 11:48 ` Jens Glaser
3 siblings, 0 replies; 5+ messages in thread
From: Jens Glaser @ 2006-04-21 22:59 UTC (permalink / raw)
To: linux-hotplug
Hello Marco,
it does not yet quite work:
this is the file /etc/udev/rules.d/010-local-rules:
KERNEL="ttyS1", RUN+="/bin/sh -c '/usr/bin/logger -p user.info test'"
(just for testing)
But the command never gets executed. I also did
"udevcontrol reload_rules".
Here's the log_priority\x10 debugging output when inserting the card:
------- snip --------
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 979 forked, pid [8541], 'add' 'pcmcia', 0 seconds old
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 980 forked, pid [8543], 'add' 'pcmcia', 0 seconds old
Apr 22 01:01:53 debian udevd-event[8541]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:0f.1/1.0/bus' appeared after 0 loops
Apr 22 01:01:53 debian udevd-event[8541]: match_rule: MODALIAS is deprecated, use ENV{MODALIAS} or SYSFS{modalias} instead.
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/lib/udev/pcmcia-check-broken-cis'
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/lib/udev/pcmcia-check-broken-cis' returned with status 0
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/bin/sh -c 'echo 1 > /sys//devices/pci0000:00/0000:00:0f.1/1.0/allow_func_id_match''
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/bin/sh' returned with status 0
Apr 22 01:01:53 debian udevd-event[8541]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/sbin/modprobe pcmcia:m00A4c0276f02fn00pfn00pa32607776pbD9E73B13pc0E87332Epd00000000'
Apr 22 01:01:53 debian udevd-event[8543]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:0f.1/1.1/bus' appeared after 0 loops
Apr 22 01:01:53 debian udevd-event[8543]: match_rule: MODALIAS is deprecated, use ENV{MODALIAS} or SYSFS{modalias} instead.
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/lib/udev/pcmcia-check-broken-cis'
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/lib/udev/pcmcia-check-broken-cis' returned with status 0
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/bin/sh -c 'echo 1 > /sys//devices/pci0000:00/0000:00:0f.1/1.1/allow_func_id_match''
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/bin/sh' returned with status 0
Apr 22 01:01:53 debian udevd-event[8543]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/sbin/modprobe pcmcia:m00A4c0276f02fn01pfn01pa32607776pbD9E73B13pc0E87332Epd00000000'
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 981 forked, pid [8551], 'add' 'module', 0 seconds old
Apr 22 01:01:53 debian udevd-event[8551]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8551]: udev_event_run: seq 981 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 981, pid [8551] exit with 0, 0 seconds old
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 982 forked, pid [8553], 'add' 'drivers', 0 seconds old
Apr 22 01:01:53 debian udevd-event[8553]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8553]: udev_event_run: seq 982 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 982, pid [8553] exit with 0, 0 seconds old
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 983 forked, pid [8555], 'remove' 'tty', 0 seconds old
Apr 22 01:01:53 debian udevd-event[8555]: udev_db_get_device: no db file to read /dev/.udev/db/class@tty@ttyS1: No such file or directory
Apr 22 01:01:53 debian udevd-event[8555]: delete_node: removing device node '/dev/ttyS1'
Apr 22 01:01:53 debian udevd-event[8555]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8555]: run_program: 'udev_run_hotplugd tty'
Apr 22 01:01:53 debian udevd-event[8555]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8555]: run_program: 'udev_run_devd tty'
Apr 22 01:01:53 debian udevd-event[8555]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8555]: udev_event_run: seq 983 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 983, pid [8555] exit with 0, 0 seconds old
Apr 22 01:01:53 debian kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/sbin/modprobe' returned with status 0
Apr 22 01:01:53 debian udevd-event[8543]: run_program: 'udev_run_hotplugd pcmcia'
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8543]: run_program: 'udev_run_devd pcmcia'
Apr 22 01:01:53 debian udevd-event[8543]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8543]: udev_event_run: seq 980 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 980, pid [8543] exit with 0, 0 seconds old
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/sbin/modprobe' returned with status 0
Apr 22 01:01:53 debian udevd-event[8541]: run_program: 'udev_run_hotplugd pcmcia'
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8541]: run_program: 'udev_run_devd pcmcia'
Apr 22 01:01:53 debian udevd-event[8541]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8541]: udev_event_run: seq 979 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 979, pid [8541] exit with 0, 0 seconds old
Apr 22 01:01:53 debian udevd[262]: udev_event_run: seq 984 forked, pid [8564], 'add' 'tty', 0 seconds old
Apr 22 01:01:53 debian udevd-event[8564]: udev_rules_get_name: no node name set, will use kernel name 'ttyS1'
Apr 22 01:01:53 debian udevd-event[8564]: create_node: creating device node '/dev/ttyS1', major = '4', minor = '65', mode = '0660', uid = '0', gid = '20'
Apr 22 01:01:53 debian udevd-event[8564]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',
Apr 22 01:01:53 debian udevd-event[8564]: run_program: 'udev_run_hotplugd tty'
Apr 22 01:01:53 debian udevd-event[8564]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8564]: run_program: 'udev_run_devd tty'
Apr 22 01:01:53 debian udevd-event[8564]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Apr 22 01:01:53 debian udevd-event[8564]: udev_event_run: seq 984 finished
Apr 22 01:01:53 debian udevd[262]: udev_done: seq 984, pid [8564] exit with 0, 0 seconds old
------- snip --------
Also, ttyS1 does not seem to get registered to the PCMCIA device:
# udevinfo -q path -n ttyS1
no record for 'ttyS1' in database
Any ideas?
Thank you,
kind regards,
Jens.
On Sat, 22 Apr 2006, Marco d'Itri wrote:
> On Apr 22, Jens Glaser <pge99brq@studserv.uni-leipzig.de> wrote:
>
> > The problem seems to be that UDEV creates the device /dev/ttyS1 only AFTER
> > the whole modprobe command has finished. How can I execute the
> > setserial command after after device creation?
> You should use a RUN rule instead:
>
> KERNEL="ttyS1", \
> RUN+="/bin/sh -c 'setserial /dev/ttyS1 low_latency 2>&1 |logger -p user.info'"
>
> --
> ciao,
> Marco
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: serial_cs, setserial and UDEV
2006-04-21 22:02 serial_cs, setserial and UDEV Jens Glaser
` (2 preceding siblings ...)
2006-04-22 6:36 ` Andrey Borzenkov
@ 2006-04-22 11:48 ` Jens Glaser
3 siblings, 0 replies; 5+ messages in thread
From: Jens Glaser @ 2006-04-22 11:48 UTC (permalink / raw)
To: linux-hotplug
Hi Andrey,
On Sat, 22 Apr 2006, Andrey Borzenkov wrote:
> On Saturday 22 April 2006 02:59, Jens Glaser wrote:
> > Hello Marco,
> >
> > it does not yet quite work:
> >
> > this is the file /etc/udev/rules.d/010-local-rules:
> > KERNEL="ttyS1", RUN+="/bin/sh -c '/usr/bin/logger -p user.info test'"
> >
> > (just for testing)
> >
> > But the command never gets executed.
>
> could you start 'udevmonitor --env', plug in your card and post output?
Thanks for answering but I now solved the problem: the command
did not get executed because the rule file did not have the extension
".rules"! (but "-rules" instead, which is wrong).
In my opinion this is not a very user-friendly convention, but maybe this
is only the case for debian.
Kind regards,
Jens.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread