DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-12-31 00:12:34

Dig
New member
Registered: 2007-12-31
Posts: 3

Sending firmware to printer automatically.

I have a GDI printer (HP 1020) and I've got it working with the DNS 323 (finally, only taken 4 months!)

except the following command is never issued automatically:

cat /usr/firmware/sihp1020.dl > /dev/usblp0

I if type it manually (after telnetting to the device, chroot etch, issue that command) the printer print perfectly.

The printer is always on before the NAS, and I've tried putting the command in linuxrc (no joy) and making a firmware.sh file and putting it in init.d (in etch) and still no joy.

Any idea how to:
a) set this up so that command is issued automatically when the nas boots up, or
b) troubleshoot this to find out what, if any error messages there are and why its not working.  (running the firmware.sh script manually works fine, it just doesn't seem to call it automatically on start up).

I'm not the greatest linux user in the world, especially through telnet, but I do know my way around a bit, some pointers in the right direction would be great,

Cheers,

Nick

Offline

 

#2 2008-01-02 06:00:55

mykroft
Member
Registered: 2007-05-12
Posts: 83

Re: Sending firmware to printer automatically.

does your script have access to read the file?

try making it 755 for its privs and see what happens....

Myk

Offline

 

#3 2008-01-04 00:30:46

Dig
New member
Registered: 2007-12-31
Posts: 3

Re: Sending firmware to printer automatically.

Tried 755 for both the shell script and firmware file (in case that made any difference)
moved the firmware file to /etc/firmware in case init runs as a different user and that does something? but it didn't make any difference.

Work fine if I manually run the file from telnet, but it doesn't run automatically.  is there an output file from init that would show any error messages if it is calling my script?

Offline

 

#4 2008-01-05 16:52:08

mykroft
Member
Registered: 2007-05-12
Posts: 83

Re: Sending firmware to printer automatically.

have your script do a echo "Text In here" >> /location/log.txt just before your call and see if that shows up in the .txt file to see if your script is even running at bootup

Offline

 

#5 2008-01-16 09:54:48

markchicobaby
Member
Registered: 2008-01-13
Posts: 22

Re: Sending firmware to printer automatically.

Can you simply run it as part of your own version of fun_plug?  fun_plug seems to be able to run what ever it wants, so you definitely should be able to get this to execute.

- Can you post the script you're trying to run
- Also once you've written your script, you should see if you can run it from the command line, and make sure that it does what you want.  Then, once you manage to get fun_plug to run it, you should be fine.

The other thing to be aware of is to be careful with environment variables in the script, if you're using any.  Scripts don't always inherit the same environment variables that you get as a user.

M

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB