abachus has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I'd like to perform a pivot_root(2) on a remote machine,
but i don't really want to sit here and write the program
in C. Is there such a perl function or module that could
handle the task at hand.

many thanks

Replies are listed 'Best First'.
Re: pivot_root in perl ?
by Fletch (Bishop) on Jun 23, 2006 at 13:13 UTC

    Nothing jumps out on CPAN, but it should be trivial to use either syscall or Inline::C to call it.

Re: pivot_root in perl ?
by Joost (Canon) on Jun 23, 2006 at 16:26 UTC
Re: pivot_root in perl ?
by ambrus (Abbot) on Jun 23, 2006 at 17:42 UTC

    Also, as you probably have to run pivot_root only very rarely, you can write only that part as a separate C program and call that from perl.

    Update: I seem to have it as a pre-installed program on my debian system too.