From: Allen B. <ba...@lo...> - 2001-05-18 18:02:35
|
I think I've diagnosed this problem. When ptal-mlcd is started by this sequence of events: kernel -> khubd: notices a new device khubd -> /sbin/hotplug add usb /sbin/hotplug -> /etc/hotplug/usb.agent -> /etc/hotplug/usb/printer -> ptal-mlcd It turns out that STDIN is not open when ptal-mlcd starts! Therefore, when ptal-mlcd opens its command socket, /dev/ptal-mlcd/usb:0, that socket gets file descriptor = 0. Later, ptal-mlcd closes STDIN in consoleOpenQuiet, inadvertently closing the socket. (It didn't occur to me until just now that a simple fix might be to use ptal-mlcd usb:0 -device /dev/usb/lp0 < /dev/null in the script.) OK? Allen Carlos Puchol wrote: > > Allen Barnett <ba...@lo...> wrote: > > I've noticed now that since upgrading to RH 7.1 (which actually involved > > reverting the kernel to an earlier rev.), that cold starting the USB > > printer and the ptal daemons from hotplug doesn't work reliably anymore. > > I have to re-plugin the printer and start the daemons manually after the > > machine is up and stable. > > hi allen, > > i think this is what it is happening in my case, it is just that i was > assuming that loading the daemons via the hotplugging was not > an issue. in fact, it would seem rather harmless to do it automatically > vs manually. perhaps a matter of timing? > > it would seem then that my asus usb hardware is ok. > > what exactly do you have to re-load every time? > > i was able to put the printer back in operation on usb now. > i removed the uhci and printer modules, then plugged the printer. > then loaded the modules, then ran the daemons. > > killall -HUP ptal-printd ptal-mlcd > rmmod uhci printer; modprobe uhci printer > ptal-mlcd usb:0 -device /dev/usb/lp0; ptal-printd mlc:usb:0 -like /dev/lp0 > # plug or power on printer > > what could be the problem be with this script in /etc/hotplug/usb/printer > > #!/bin/sh > # > # this is /etc/hotplug/usb/printer > # > if [[ -n "$PRODUCT" && $(expr $PRODUCT : 3f0) = 3 ]] ; then > /opt/hpoj-010515/bin/ptal-mlcd usb:0 -device /dev/usb/lp0 > /opt/hpoj-010515/bin/ptal-printd mlc:usb:0 -like /dev/lp0 > fi > > thanks for your help! |