View Single Post
Posts: 144 | Thanked: 45 times | Joined on Oct 2007 @ Detroit
#32
Originally Posted by qwerty12 View Post
In your package. create a file called:
/etc/sudoers.d/bluemaemo.sudoers

Put this in the file:
user ALL = NOPASSWD: <program you want to be able to execute as root - FULL PATH MUST BE SPECIFIED>

In the postinst, put:
update-sudoers || true

Then where you need to run the program as root, just specify sudo <program> to start the program.
This is what i initially did for switchonbt script, a better way would be to use d-bus commands.
Let me know if I can be of help.

~m~
Varghese
 

The Following User Says Thank You to vabgeo For This Useful Post: