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 2008-01-22 16:04:57

fordem
Member
Registered: 2007-01-26
Posts: 1938

Does the DNS-323 have a shutdown command?

Does the DNS-323 have a shutdown command and if so what is the full path to it?

It seems to recognize "poweroff" from the CLI, but this apparently halts the processor and does not actually power the unit off.

Offline

 

#2 2008-01-22 16:30:09

ChrisOwens
Member
Registered: 2007-12-07
Posts: 31

Re: Does the DNS-323 have a shutdown command?

Search these forums for "/tmp/shutdown" -- there are a couple of threads that mention it -- apparently chkbutton looks for that file, and if it exists (e.g. touch /tmp/shutdown), it causes the unit to  shutdown.

Offline

 

#3 2008-01-22 16:42:36

Tilly
Member
Registered: 2007-11-11
Posts: 139

Re: Does the DNS-323 have a shutdown command?

fordem wrote:

Does the DNS-323 have a shutdown command and if so what is the full path to it?

Hi fordem

I use this from my XP desktop:

http://DNS-323 IP/goform/sysShutDown

Offline

 

#4 2008-01-22 16:44:45

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: Does the DNS-323 have a shutdown command?

Curious - ls /tmp reveals no shutdown command - /tmp/shutdown returns /tmp/shutdown: not found but touch /tmp/shutdown, shuts the unit down.

No matter, I think it'll do what I want, thanks a mil.

Edit - after a bit more reading - I guess my linux noobishness shows - touch creates /tmp/shutdown - which triggers the shutdown.

Last edited by fordem (2008-01-22 17:08:58)

Offline

 

#5 2008-01-22 17:09:22

Tilly
Member
Registered: 2007-11-11
Posts: 139

Re: Does the DNS-323 have a shutdown command?

fordem wrote:

Curious - ls /tmp reveals no shutdown command - /tmp/shutdown returns /tmp/shutdown: not found but touch /tmp/shutdown, shuts the unit down.

Look in the sourcecode from the site Tools - System at line 238 and you should find this:

Code:

<H2>SHUTDOWN : </H2>
<FORM method="POST" action="/goform/sysShutDown" name="shootdown">

I use the firmware 1.04b82

Offline

 

#6 2008-09-22 10:07:15

mealto
Member
Registered: 2008-02-02
Posts: 95

Re: Does the DNS-323 have a shutdown command?

Tilly wrote:

fordem wrote:

Does the DNS-323 have a shutdown command and if so what is the full path to it?

Hi fordem

I use this from my XP desktop:

http://DNS-323 IP/goform/sysShutDown

So I tried using this in a web browser and it only works if I am logged in to the unit. How would one use this method to setup a UPS to gracefully shutdown the 323 in case of a power failure? How would you ensure the 323 would authenticate the Vista machine to accept this shutdown command?

Offline

 

#7 2008-09-22 11:40:00

knireis
Member
Registered: 2007-12-10
Posts: 231

Re: Does the DNS-323 have a shutdown command?

Tilly wrote:

fordem wrote:

Does the DNS-323 have a shutdown command and if so what is the full path to it?

Hi fordem

I use this from my XP desktop:

http://DNS-323 IP/goform/sysShutDown

Is there also a restart command? I tried sysRestart, sysReStart, sysReboot and sysReBoot, but they don't work.

Last edited by knireis (2008-09-22 11:40:21)

Offline

 

#8 2008-09-22 11:44:44

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: Does the DNS-323 have a shutdown command?

mealto wrote:

Tilly wrote:

fordem wrote:

Does the DNS-323 have a shutdown command and if so what is the full path to it?

Hi fordem

I use this from my XP desktop:

http://DNS-323 IP/goform/sysShutDown

So I tried using this in a web browser and it only works if I am logged in to the unit. How would one use this method to setup a UPS to gracefully shutdown the 323 in case of a power failure? How would you ensure the 323 would authenticate the Vista machine to accept this shutdown command?

That's an interesting one, I had a similar challenge with the linksys web camera and figured out how to do it. I have no way of verifying it now, but the following should work in the linux script:

wget -q -O /dev/null --user=username --password=userpassword http://dns323_ip_address/goform/sysShutDown

Last edited by skydreamer (2008-09-22 11:45:45)

Offline

 

#9 2008-09-22 20:29:04

noodle
Member
Registered: 2007-07-13
Posts: 62

Re: Does the DNS-323 have a shutdown command?

If you have USB driver mounted, shutdown from web site will not umount it correctly. Even worth, if you have USB mounted under /mnt/HD_a(b)2, it will not umount /mnt/HD_a(b)2 correctly. So be careful if you have USB driver installed.

Offline

 

#10 2008-09-23 02:37:31

rage_311
Member
Registered: 2008-09-20
Posts: 12

Re: Does the DNS-323 have a shutdown command?

knireis wrote:

Is there also a restart command? I tried sysRestart, sysReStart, sysReboot and sysReBoot, but they don't work.

do_reboot should do it (via telnet)

Offline

 

#11 2008-09-23 03:55:11

mealto
Member
Registered: 2008-02-02
Posts: 95

Re: Does the DNS-323 have a shutdown command?

The unit has nothing installed on the USB port. It's not running anything except the stock FW (1.05). I will haev to try this command once I get the UPS software setup (PowerChute Business in Vista). Wish me luck!

wget -q -O /dev/null --user=username --password=userpassword http://dns323_ip_address/goform/sysShutDown

Offline

 

#12 2008-11-03 05:07:56

mealto
Member
Registered: 2008-02-02
Posts: 95

Re: Does the DNS-323 have a shutdown command?

ok, looks like APC's PowerChute allow us to run command lines via text files. How can we turn this:

wget -q -O /dev/null --user=user --password=password http://DNS323IP/goform/sysShutDown

into a text file so that we can initiate a safe shutdown of the DNS-323?

Offline

 

#13 2008-11-03 10:29:02

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Does the DNS-323 have a shutdown command?

You could put it in a php script exec command and make it available with lighttpd with php support. When you open the script with a web browser it executes the line and shuts the unit down.

Last edited by RunaR (2008-11-03 10:30:03)

Offline

 

#14 2008-11-03 12:31:05

Tilly
Member
Registered: 2007-11-11
Posts: 139

Re: Does the DNS-323 have a shutdown command?

RunaR wrote:

You could put it in a php script exec command and make it available with lighttpd with php support. When you open the script with a web browser it executes the line and shuts the unit down.

Why so complicated?

Try this tiny tool: http://www.dl-support.de/forum/viewtopic.php?t=18954

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB