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 -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
