Subject: | More portable sudo? |
Michael G Schwern wrote:
Show quoted text
>On Tue, Oct 21, 2003 at 10:09:52AM -0700, Stas Bekman wrote:
>
"su -c" is more portable but sudo is safer. I'd have CPANPLUS look for sudo first, then if not ask the user if they want to use su -c instead.
>>>CPANPLUS likes to know how to run a single command as superuser. On Unix
>>>the simplest way to do this is to use a command called "sudo".
>>>
>>> sudo some_command_i_want_to_run_as_root
>>
>>This is not portable (even for unix). I have first used this approach in
>>Apache::Test, but Vivek Khera told me that sudo is not installed on all
>>Unices. It seems that you want to do 'su -c' instead.