|
Post by davidchapman on Aug 30, 2007 4:27:24 GMT 7
I use my thecus 5200 has a home NAS and so it is switched on and off as required. If would be great if i could create a shortcut on my desktop to shut the thecus down. I've updated to version firmware 1.00.10 . Under system there is a reboot and shutdown option. xx.xx.x.xx/adm/getform.html?name=sdrbPlease can someone work out how the shutdown button works and see if this can be scripted - even if it contains the username and password as it would only be run from a secure pc. I dont think this NAS has WOL which is a real shame but at least this shortcut would make this a lot simpler to use. Anyone able to help or has already thought of this??? Cheers Dave
|
|
|
Post by omega on Aug 30, 2007 4:55:14 GMT 7
Hi Dave,
I've already done a solution for this: there is a module SHUTDOWN which enables you to shutdown or reboot the N5200 just by login in as user shutdown or reboot.
But this module needs the IMGDUP module which at least is a little bit tricky.
If time permits I'll think about a solution which doesn't need the IMGDUP module.
Andreas
|
|
|
Post by davidchapman on Jan 19, 2008 16:52:26 GMT 7
thanks for letting me know re the module you've done but i was wondering if this could be done without logging into the webpage at all.
ie passing the username password in the url that runs a shutdown action.
If it cant be done dont worry - would just be useful thats all
Cheers
|
|
|
Post by gideon007 on Jan 20, 2008 0:32:30 GMT 7
ok, now I see why it is not working for me anymore. I'd need imgdup (which I really am afraid of after my last fiasco with it). It'd be nice if onbeat.dk/thecus/index.php/N5200_Module:_SHUTDOWN would mention on the Facts that the shutdown module depends on imgdup. Most likely I knew this once but forgot since the first time I tested it in the beginning...
|
|
|
Post by omega on Jan 22, 2008 18:18:20 GMT 7
I've checked my SHUTDOWN module again and with FW 2.00.04 it seems to work without any issues.... In order to shutdown/reboot the N5200 you just need to login via SSH as user shutdown or reboot and then the procedure is started. gideon007: the IMGDUP module is NOT needed for the SHUTDOWN module! Why do you think that IMGDUP is needed? Does someone else use the SHUTDOWN module and could give some experience with it? Andreas EDIT: I've just seen that I wrote myself that the IMGDUP module is needed..... I don't know why I wrote this but at least it was and is not true, sorry, my fault!
|
|
|
Post by gideon007 on Jan 22, 2008 21:08:10 GMT 7
Yeah, that you wrote IMGDUP is needed made me write my reply Ok, since that is not needed, any idea on how to troubleshoot why it is not working for me? I am able to ssh into the machine, so if you tell me to do something I can do that
|
|
|
Post by omega on Jan 22, 2008 22:41:46 GMT 7
Whenever you try to shutdown/reboot the N5200 a log file /etc/sysdown.log is written. Can you post this log file here?
Andreas
|
|
|
Post by gideon007 on Jan 23, 2008 2:32:08 GMT 7
it's not being generated on neither of my two systems
|
|
|
Post by omega on Jan 23, 2008 2:34:28 GMT 7
How do you initiate the shutdown?
Andreas
|
|
|
Post by gideon007 on Jan 23, 2008 3:10:01 GMT 7
I'm either logging in via plink.exe (PuTTY Link: command-line connection utility) with the bat: plink -l shutdown -pw **** 192.168.1.100 or via another SSH program (an old freeware client from ssh.com) with the username shutdown and the correct password. On either use nothing happens after I log on. I *thought* logging in with either reboot or shutdown would initiate either action on its own or am I mistaken? Does any of the Thecus services like afp, nfs or whatever need running?
|
|
|
Post by omega on Jan 23, 2008 5:39:21 GMT 7
No, then obviously something is wrong..... When you log in as user shutdown/reboot you mustn't get a shell prompt - the script /raid/data/module/SHUTDOWN/system/doshutdown or /raid/data/module/SHUTDOWN/system/doreboot should be called instead. Can you please check your /etc/passwd and post the lines for the shutdown and reboot user. Maybe you might want to reinstall the SHUTDOWN module again as something might be wrong with the current installation... Andreas
|
|
|
Post by gideon007 on Jan 23, 2008 6:34:59 GMT 7
/etc/passwd : shutdown:x:0:0::/root:/bin/sh reboot:x:0:0::/root:/bin/sh
I'll try un/reinstalling the module now.
Edit: no go... behaves the same, also no log made...
|
|
|
Post by peterfu on Jan 23, 2008 14:58:36 GMT 7
Sorry to step in here: @gideon: may be You should remove the backuped data after the deinstallation of the SHUTDOWN module and before the new installation to have a realy new installation of the module. The backup data are all in /raid/data/module/backup/SHUTDOWN - so removing this directory completly before a new installation makes it realy a new installation. br peter
|
|
|
Post by omega on Jan 23, 2008 15:04:11 GMT 7
Something is really wierd I just uninstalled the SHUTDOWN module, verified, that the shutdown and reboot users have been deleted from /etc/passwd, installed the module again and checked the /etc/passwd file again and I can see now the correct entries again: shutdown:x:0:0::/tmp:/raid/data/module/SHUTDOWN/system/doshutdown reboot:x:0:0::/tmp:/raid/data/module/SHUTDOWN/system/doreboot
This should be the same for you and we need to find out what goes wrong here..... Do you use version SHUTDOWN 2.00.02? Did you check the installation notification e-mail? I've just seen that for me the e-mail stated an error for restoring the previous passwords for the shutdown and reboot users. I'll check this out. But despite of this, it should work anyway.... Andreas
|
|
|
Post by omega on Jan 23, 2008 15:13:12 GMT 7
Hi Peter, don't feel sorry - your help is always highly appreciated I've just checked this and I feel 'cause I didn't thought of it earlier... You are most likely right here: somehow the wrong passwd settings were saved in the backup data and therefore restored every time. I think I need to create a " remove current configuration and create default configuration" button in the module interface in order to automate this procedure. So Gideoan, like Peter said: 1) uninstall the module 2) rm -rf /raid/data/module/backup/SHUTDOWN 3) install the module again Andreas
|
|