OpenWrt Forum Archive

Topic: autorun script for firmware printer

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I have printer HP LJ P1005, he is already connected on my router with OpenWRT, and worked with comand: "cat /usr/lib/sihpP1005.dl > /dev/usb/lp0". p910nd started up too. With next reboot or power off/on i must again type comand:  "cat /usr/lib/sihpP1005.dl > /dev/usb/lp0" from ssh console.

Question!

How to make up add AUTORUN SCRIPT for this... and there place SCRIPT file?

P. S. I see more scripts, but i not understand how it works...

Please, help me...

from luci.. system, startup, at the bottom of the page you can paste any script you want.. they go into /etc/rc.local wink

(Last edited by nebbia88 on 27 Jul 2012, 13:08)

nebbia88 wrote:

from luci.. system, startup, at the bottom of the page you can paste any script you want.. they go into /etc/rc.local wink

Thank you nebbia88, i past "cat /usr/lib/sihpP1005.dl > /dev/usb/lp0" into "system, startup, in Local Startup field":

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
cat /usr/lib/sihpP1005.dl > /dev/usb/lp0
exit 0

Great! it works after reboot router!

I hope my printer don`t do self disconnect/connect (plug add / plug remove, power off/on) temporary...
If he be worked always on - must be printable! or i reboot the router and it wors again.

maby where exist the SCRIPT for this task (plug remove / plug add printer on usb port )?

How to...?

The discussion might have continued from here.