Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12586 Discussions

Execute reboot script with haserl

Altera_Forum
Honored Contributor II
1,111 Views

Hi, I am using haserl for cgi programming and want to reboot my uClinux board through pushing a button on a website. So I thought that I can execute the reboot script like that: 

#!/usr/bin/haserl --shell=/bin/hush Content-type: text/html <!-- <% if ; then %> <% /bin/reboot %> <% fi %> --> ... <tr><td colspan="3" class="OptionLabel"><center><input name="Reboot" value="Reboot Now" type="submit"> ...  

 

But nothing seems to happen. 

 

Urmel
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
363 Views

Wild guess:  

Haserl is running as some HTTP user and same has no right to force the reboot. 

 

Of course you should send a web page saying "Booting..." to the browser, when the commant is detected, so you know whether the rebooot command it reached at all.  

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
363 Views

Thanks Michael, you guessed right. :) 

It was again a problem with the rights of the file. 

So I changed it to root and now it works fine!
0 Kudos
Reply