On 12/08/2018 11:48 AM, Bruce Dubbs via blfs-support wrote:
On 12/08/2018 10:04 AM, Wayne Sallee via blfs-support wrote:Instead of going the sudo rout, I ended up creating a file chmod 4751: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> int main() { setuid( 0 );Â Â // you can set it at run time also clearenv(); system("/usr/sbin/pm-suspend"); return 0; }I don't see why a C program is needed. Why not just: sudo /usr/sbin/pm-suspend It can be shortened by a little with a short bash scrript of even an alias. -- Bruce
Yes, the sudo method would work, but I don't have sudo installed, and don't want it installed. Wayne Sallee [email protected] http://www.WayneSallee.com -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
