[luci] module auth and init.d script problems

Christian Gagneraud chris at techworks.ie
Fri Oct 26 20:37:59 CEST 2012


On 25/10/12 10:40, Jo-Philipp Wich wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi.
>
>> Any help or point out would be greatly appreciated.
> The "Applying changes" box actually calls /servicectl/ (defined in
> /usr/lib/lua/luci/controller/admin/servicectl.lua) via AJAX, so make
> sure that you change the sysauth there as well.
>
> You should be able to monkey-patch it from one of your controllers
> like this:
>
> - -- 8< --
> local ctl = node("servicectl")
> if ctl then
>      ctl.sysauth = { "administrator", "operator" }
> end
> - -- >8 --
Hi Jow,

Unfortunately it didn't do the trick, I tried to modify it directly in 
servicectl.lua as well, but it didn't work.
Now, what i did is remove the sys.exit(0) just after the 
luci.http.write("OK"), because i noticed that when calling directly the 
url (stok=.../servicectl/restart/...) to restart the service, the http 
request will time out after a long time. The GET request will simply 
return "OK" but will never been "finalised" by the server.

What do you think about this strange hack I had to do?

Regards,
Chris

>
>
> ~ Jow
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlCJCQ4ACgkQdputYINPTPPFwgCeJgU6jMliphgO1OT32CDkR7Sk
> gKsAnR0XCH3hh5VXBZVCk0xBN6QYM9uq
> =j+wx
> -----END PGP SIGNATURE-----
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/
--
Visit us at the International Conference on Ocean Energy
Dublin 17-19 Oct
http://www.icoe2012dublin.com/



More information about the luci mailing list