View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#181
Originally Posted by fatalsaint View Post
although I don't think depending on rootsh is a good idea.
Precisely. Place a file in /etc/sudoers.d with a command that you want whitelisted for running as root via sudo (standard sudoers syntax), instead, and run "update-sudoers" in the postinst and postrm scripts of the package.

Originally Posted by fatalsaint View Post
There must be some kind of API in dbus or somewhere to tell the device to reboot properly instead of running shell commands.
Code:
run-standalone.sh dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
Put the equivalent of that into your favourite solution for using D-Bus in an app (DBus-GLib, libosso, python-osso, python-dbus, libdbus, QDBus, ..)
http://maemo.org/api_refs/5.0/5.0-fi...-names_8h.html explains some more of the method calls available to you.

Last edited by qwerty12; 2010-02-26 at 17:24.
 

The Following 4 Users Say Thank You to qwerty12 For This Useful Post: