in reply to system commands and returns
system runs a separate process, so you're spawning a new process, running su in that, and then exiting. I think you need to stay in the process once you've switched users. Perhaps something like IPC::ShellCmd::Sudo (I haven't used it) would help?
Improve your skills with Modern Perl: the free book.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system commands and returns
by Anonymous Monk on Nov 29, 2011 at 19:17 UTC | |
by chromatic (Archbishop) on Nov 29, 2011 at 19:35 UTC | |
by perl_zen (Initiate) on Nov 30, 2011 at 14:22 UTC | |
by chromatic (Archbishop) on Nov 30, 2011 at 16:33 UTC |